By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,710 Members | 1,906 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,710 IT Pros & Developers. It's quick & easy.

psycopg help

P: n/a

First, apologies in advance for this somewhat OT post ...

I'm looking for a source of information on using the psycopg
interface to postgresql. A mailing list would be ideal. I've
poked at their wiki, but not found what I'm looking for.

Also, new to both postrgresql & psycopg, my questions appear
too basic for the doc/examples they provide with their installation.
i.e.:

- What's the appropriate syntax for specifying a primary key?

- What is the data type "text?" And how does it differ from
CHAR(len), &c.?

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:
curs.execute("""CREATE TABLE key_test (
key_col CHAR(9) PRIMARY KEY,
nother_col CHAR(256))""")

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

Thanks!
Scott
---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Nov 23 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
> interface to postgresql. A mailing list would be ideal. I've

ps*****@lists.initd.org
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postgresql.org so that your
message can get through to the mailing list cleanly

Nov 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.