copy_from() with a list of columns?
Stephane Bortzmeyer <[email protected]>
| Newsgroups | gmane.comp.python.db.psycopg.devel |
|---|---|
| Organization | NIC France |
| Message-ID | <[email protected]> |
PostgreSQL's COPY has a way to specify a subset of the columns:
http://www.postgresql.org/docs/current/static/sql-copy.html
COPY tablename [ ( column [, ...] ) ]
FROM { 'filename' | STDIN }
...
But psycopg's copy_from seems to have no way to specify the columns
you use. In my schema, some columns have a default value (now() or
SERIAL) and I don't want to have to specify a value. How to do it with
psycopg?