dbTalk Databases Forums  

Re: attn.: psycopg users -- simple question

comp.databases.postgresql.general comp.databases.postgresql.general


Discuss Re: attn.: psycopg users -- simple question in the comp.databases.postgresql.general forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Scott Frankel
 
Posts: n/a

Default Re: attn.: psycopg users -- simple question - 10-19-2004 , 04:40 PM







Ack! I sent this msg on October 14. Since then, I've gotten the
primary
key stuff working.

Please disregard this msg.

Thanks
Scott




On Oct 14, 2004, at 4:16 PM, Scott Frankel wrote:

Quote:
Sorry to burden this list (again) with a psycopg question.
I'm stuck at a table creation step and am not getting results
from their list.

Question: what's the appropriate syntax for specifying a primary
key?

My very simple table creation test (based on their "first.py"
example is failing ... Here's what I'm trying. Non-pythonated
syntax works in pgsql:

no go in psycopg:
curs.execute("""CREATE TABLE key_test (
key_col CHAR(9) PRIMARY KEY,
nother_col CHAR(256))""")

pure joy in pgsql:
cs_test=# CREATE TABLE key_test (
cs_test(# key_col CHAR(9) PRIMARY KEY,
cs_test(# nother_col CHAR(256)
cs_test(# );

Thanks again!
Scott


---------------------------(end of
broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo (AT) postgresql (DOT) org)


---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.