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 [EMAIL PROTECTED])

Reply via email to