[sqlalchemy] [Bug?][v0.9.8][postgres] Table.create(): checkfirst=True does NOT work for temporary tables

2014-12-04 Thread Ladislav Lenart
Hello. The following code crashes: # db init... meta = MetaData() foo = Table('tmp_foo' meta, Column('id', Integer, primary_key=True), prefixes=['TEMPORARY'], ) conn = session.connection() foo.create(conn, checkfirst=True) foo.create(conn, checkfirst=True) This is because the

Re: [sqlalchemy] [Bug?][v0.9.8][postgres] Table.create(): checkfirst=True does NOT work for temporary tables

2014-12-04 Thread Michael Bayer
On Dec 4, 2014, at 9:36 AM, Ladislav Lenart lenart...@volny.cz wrote: Hello. The following code crashes: # db init... meta = MetaData() foo = Table('tmp_foo' meta, Column('id', Integer, primary_key=True), prefixes=['TEMPORARY'], ) conn = session.connection()

Re: [sqlalchemy] [Bug?][v0.9.8][postgres] Table.create(): checkfirst=True does NOT work for temporary tables

2014-12-04 Thread Ladislav Lenart
Wow! Thank you! I guess this is a near-light-speed support in practice! :-) I stumbled upon this issue while I was trying to figure out how to work with temporary tables in SQLAlchemy. Final version of my code does not use the checkfirst flag at all, because I know when to create and when to