Skip to content

psycopg2.sql how to write a "CREATE TABLE..." statement specifying column names + types? #1618

Closed Answered by dvarrazzo
henryli78 asked this question in Q&A
Discussion options

You must be logged in to vote

The error message is not consistent with your code: you have brackets in you code ({cols}) that don't appear in the message.

You can use print(sql.as_string(conn)) to figure out what you are doing wrong.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@henryli78
Comment options

Answer selected by henryli78
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants