On Jun 13, 2008, at 11:28 AM, vomjom wrote:
> > I'm wondering though. Will you accept an enhancement that allows you > to use postgresql's COPY in a similar way to how psycopg2 implements > it? > > In psycopg2, there are three functions: copy_from, copy_to, > copy_expert > curs.copy_from(io, 'test_copy') will initiate a COPY using io (which > can be any python file-like object) to the table 'test_copy' > copy_to is similar and copy_expert allows you to form your own COPY > statement. > > With postgresql, COPY is far faster than doing inserts. theres nothing preventing you from calling copy() from the cursor yourself ..... conn = engine.connect() cursor = conn.connection.cursor() # go nuts with cursor as far as a "COPY" SQL construct, these are welcome as patches (which include unit tests) to be added to the postgres dialect, i.e. from sqlalchemy.databases.postgres import copy_from engine.execute(copy_from(sometable, 'somestring')) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---