Wolodja Wentland wrote: > On Tue, Nov 03, 2009 at 22:49 +0100, Wolodja Wentland wrote: >> On Tue, Nov 03, 2009 at 16:29 -0500, Michael Bayer wrote: > >> > the error is raised directly by psycopg2. > >> I was afraid that the error is with psycopg2. Are you aware of any >> bugtracker, mailing list or IRC channel that discusses psycopg2? > >> > I'd try taking out the ";" at the end of the statement, > >> That did not help unfortunately. Can you think of anything else I might >> try? > > I found the error. The problem are '%' characters in the insert > statements. Replacing '%' with '%%' solves the problem. I am still not > convinced that using SA/psycopg2 is a better approach than using a psql > subprocess. What do you think?
the "cleanest" approach would be if your "dumpfile" were just a delimited file of some kind, agnostic of database. then its a very simple script that splits on delimeter and runs in using an executemany() (that is, a single execute() with a large iteration of parameters). But if you're handed a dumpfile of Postgresql queries already in dump format, then you should just use psql. > > have a nice day > > Wolodja > --~--~---------~--~----~------------~-------~--~----~ 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 sqlalchemy+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---