Re: Improved transaction error handling
Karsten Hilbert <[email protected]>
| Newsgroups | gmane.comp.python.db.psycopg.devel |
|---|---|
| Message-ID | <[email protected]> |
On Wed, Jan 02, 2008 at 01:39:20PM +0900, James Henstridge wrote: > There were some places where pq_abort() was being called as part of > another method (e.g. setting charset, changing isolation level). For > these, I added the pq_abort_locked() call. To simplify matters, I > gave it the same calling conventions as the old pq_abort() call. As a > further improvement, it would be good for it to pass on the libpq > error so that callers can raise appropriate exceptions. Yes, please :-) This may help in detecting connection-oriented errors, too. Maybe a .libpqcode in addition to .pgcode on an exception ? Thanks, Karsten -- GPG key ID E4071346 @ wwwkeys.pgp.net E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346