Re: attn.: psycopg users -- simple question

From: Scott Frankel <leknarf(at)pacbell(dot)net>
To: Scott Frankel <frankel(at)circlesfx(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: attn.: psycopg users -- simple question
Date: 2004-10-19 21:40:45
Message-ID: 8851265A-2217-11D9-916A-000A95A7B782@pacbell.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


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:

>
> 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)
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2004-10-19 21:42:16 Re: how much ram do i give postgres?
Previous Message Oliver Jowett 2004-10-19 21:36:39 Re: Avoiding explicit addDataType calls for PostGIS