On Apr 15, 2011, at 3:17 AM, Yang Zhang wrote: > Is it possible to execute a Postegresql COPY ... FROM STDIN statement > via sqlalchemy, or do we have to drop down to psycopg2 for that > (http://initd.org/psycopg/docs/usage.html#using-copy-to-and-copy-from)? > Tried executing a COPY statement followed directly by the input > values, as in psql, but that didn't work. Thanks in advance.
SQLAlchemy doesn't have functions that connect to psycopg2's "copy_from()" etc. methods and from psycopg2s docs it seems this is how those functions are usable, as opposed to emitting the word "COPY". So you know as much as I do here, and you likely have to use the psycopg2 connection. you can get one from the pool via engine.raw_connection() if you wanted. > > -- > Yang Zhang > http://yz.mit.edu/ > > -- > You received this message because you are subscribed to the Google Groups > "sqlalchemy" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/sqlalchemy?hl=en. > -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.
