[sqlalchemy] Question about sqlalchemy inserts and deletes order in a transaction

2011-07-19 Thread ammar azif
Hi, The code that I am working on deletes rows from table A that are based on a certain query and then recreates these rows based on entries supplied by a csv file. Table A is referenced by table B. My question is, how does sql alchemy manage inserts and deletes in a transaction and it what order

[sqlalchemy] Re: information about filed create_engine

2011-07-19 Thread Eduardo
/.../.../python2.6/site-packages/SQLAlchemy-0.6.5-py2.6.egg/sqlalchemy/ dialects/postgresql/psycopg2.py, line 234, in dbapi psycopg = __import__('psycopg2') ImportError: No module named psycopg2 The module psycopg2 is already installed in the site-packages directory. I even included the path in

RE: [sqlalchemy] Re: information about filed create_engine

2011-07-19 Thread King Simon-NFHD78
Eduardo wrote: /.../.../python2.6/site-packages/SQLAlchemy-0.6.5- py2.6.egg/sqlalchemy/ dialects/postgresql/psycopg2.py, line 234, in dbapi psycopg = __import__('psycopg2') ImportError: No module named psycopg2 The module psycopg2 is already installed in the site-packages directory. I

RE: [sqlalchemy] Question about sqlalchemy inserts and deletes order in a transaction

2011-07-19 Thread King Simon-NFHD78
ammar azif wrote: Hi, The code that I am working on deletes rows from table A that are based on a certain query and then recreates these rows based on entries supplied by a csv file. Table A is referenced by table B. My question is, how does sql alchemy manage inserts and deletes in a

[sqlalchemy] Archiving PostgresSQL tables

2011-07-19 Thread RVince
I have about half a dozen PostgresSQL tables I need to zip/tar or gz up somehow, from within Python for archival/backup purposes. Anyone know of an example of this, or some idea how to do or approach this? Thanks, RVince -- You received this message because you are subscribed to the Google

Re: [sqlalchemy] Archiving PostgresSQL tables

2011-07-19 Thread Michael Bayer
I would call out to pg_dump and pg_restore. On Jul 19, 2011, at 8:14 AM, RVince wrote: I have about half a dozen PostgresSQL tables I need to zip/tar or gz up somehow, from within Python for archival/backup purposes. Anyone know of an example of this, or some idea how to do or approach

[sqlalchemy] Occasional ProgrammingError in threaded environment

2011-07-19 Thread Arthur Kopatsy
Hi, My web application has a controller that spawns multiple threads using a thread pool. Each of them has its own session (I store it in thread local). Occasionally (1 out of 100 or more) I get really strange errors that really look like corrupted queries. My guess is that it may be due to my