Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search archives
  Advanced Search

Re: commit and rollback don't throw exceptions when they should


  • From: Kris Jurka <books(at)ejurka(dot)com>
  • To: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>
  • Cc: taktos <taktos(at)gmail(dot)com>, Oliver Jowett <oliver(at)opencloud(dot)com>, pgsql-jdbc(at)postgresql(dot)org
  • Subject: Re: commit and rollback don't throw exceptions when they should
  • Date: Wed, 18 Nov 2009 19:59:57 -0500 (EST)
  • Message-id: <alpine.BSO.2.00.0911181943340.26932@leary.csoft.net> <text/plain>



On Wed, 18 Nov 2009, Kevin Grittner wrote:

That all makes sense.  I think you have a copy/paste error in the
exception message, though: "This statement has been closed."  It is
the connection which has been closed here.

Doh! Fixed.

Also, for software which tries to make sense of the SQLSTATE for
automated handling, I'm inclined to think that something in Class Code
'08' (Connection Exception) would be more useful than the Class Code
'55' (Object Not in Prerequisite State) value.  Granted, it's a gray
area, since the problem with the connection is that it's not in an
open state....

I've changed it to 08003 CONNECTION_DOES_NOT_EXIST. We're already using it for this purpose (already closed) in the connection pooling code.

Thanks for following up on this.

Kris Jurka



Home | Main Index | Thread Index

Privacy Policy | About PostgreSQL
Copyright © 1996 – 2012 PostgreSQL Global Development Group