Re: [SQLObject] Hung transactions on object creation
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Ian B. <ia...@co...> - 2003-10-27 20:44:38
|
On Monday, October 27, 2003, at 02:03 PM, Sidnei da Silva wrote: > Howdy folks, > > I'm experiencing the following problem: When an object is created, if > an exception happens inside new(), for example, a parameter which has > no default is missing, postgres gets hung on 'idle in transaction' > state. To fix it I made the following two small changes, though I'm > not sure that it will do the right thing in all cases. Any better > suggestion? Rolling back in that circumstance is way too aggressive. It should be possible to catch the exception and handle it within the transaction. Do you have an idea what "idle in transaction" means, and what's causing it? Are we talking about database-generated exceptions (like IntegrityError), or Python-generated (ValueError or something)? Or either? -- Ian Bicking | ia...@co... | http://blog.ianbicking.org |