[sqlalchemy] Re: Error trying to use session.execute

2010-06-14 Thread Faheem Mitha
On Sun, 13 Jun 2010 11:20:58 -0400, Michael Bayer mike...@zzzcomputing.com wrote: When an exception occurs in a transaction while Postgresql, you in most cases must issue a rollback() (that is what (InternalError) current transaction is aborted, commands ignored until end of transaction

[sqlalchemy] Re: Error trying to use session.execute

2010-06-13 Thread Faheem Mitha
[This message has also been posted.] On Sat, 12 Jun 2010 19:58:28 -0400, Michael Bayer mike...@zzzcomputing.com wrote: this pattern: try: foo() except: pass will get you killed every time. the difference in result is between the session's default of transactionalized execution

[sqlalchemy] Re: Error trying to use session.execute

2010-06-13 Thread Faheem Mitha
On Sun, 13 Jun 2010 13:33:39 +0530, Faheem Mitha fah...@email.unc.edu wrote: I'm going to assume comment 1 and comment 2 are unrelated. If they aren't, please correct me. As regards 1, I assume you mean try... pass... is a bad idea. I agree, but there is no CREATE LANGUAGE IF EXISTS in

Re: [sqlalchemy] Re: Error trying to use session.execute

2010-06-13 Thread Michael Bayer
On Jun 13, 2010, at 4:03 AM, Faheem Mitha wrote: On Sat, 12 Jun 2010 19:58:28 -0400, Michael Bayer mike...@zzzcomputing.com wrote: this pattern: try: foo() except: pass will get you killed every time. the difference in result is between the session's default of