5 messages in com.googlegroups.sqlalchemy[sqlalchemy] Re: ProgrammingError: (P...
FromSent OnAttachments
Matt Haggard27 Jun 2008 13:02 
Michael Bayer27 Jun 2008 13:18 
Matt Haggard27 Jun 2008 14:02 
Michael Bayer27 Jun 2008 14:30 
Matt Haggard27 Jun 2008 14:44 
Subject:[sqlalchemy] Re: ProgrammingError: (ProgrammingError) current transaction is aborted, commands ignored until end of transaction block
From:Matt Haggard (hagg@gmail.com)
Date:06/27/2008 02:44:38 PM
List:com.googlegroups.sqlalchemy

I've fixed it by calling Session.clear() at the end of every controller action (it's in __after__()).

I'm gonna go read about what that does -- right now it's just magic as far as I can tell :)

Thanks again for the help, Michael

On Jun 27, 3:30 pm, Michael Bayer <mike@zzzcomputing.com> wrote:

On Jun 27, 2008, at 5:03 PM, Matt Haggard wrote:

INSERT or UPDATE?  I don't do any inserts with this code... only changing what's already there.

Is an integrity constraint a PG thing, or SQLAlchemy model thing?

its a PG thing.  Other things can likely cause PG to get into this   state as well.   But unless you're squashing exceptions, SQLA can't   really let the DB get into this state without complaining loudly.

And can I do Session.rollback() ?

sure !