Detecting 'socket errors' - SQLSTATE patch - Mailing list pgsql-jdbc

From David Wall
Subject Detecting 'socket errors' - SQLSTATE patch
Date
Msg-id 043401c3507a$73e5d460$3201a8c0@rasta
Whole thread Raw
In response to Fix for receiving empty query errors.  (Kim Ho <kho@redhat.com>)
List pgsql-jdbc
> >>When we get the SQLSTATE patch in you'll be able to do:
> >>if ((e.getSQLState() != null) && (e.getSQLState().equals("08S01")))
> >>throw new ExplainException("Communication link error: " +
e.getMessage());
....

> First of all, this is plain SQL + JDBC specs.

Really!  Wow, now that's cool.  When will the SQLSTATE patch be available?
And it will really work with Oracle and DB2, too?  That's precisely the kind
of solution I'm looking for.  Perhaps I'll write my code to work with or
without it for now, unless that patch will be available shortly.  I need my
solution to be in place in a week or so, and I think my current coding
workaround will be compatible (sending the Connection and SQLException to a
pool handler), though this may save the 'select 1' hack.

David


pgsql-jdbc by date:

Previous
From: Oliver Jowett
Date:
Subject: Re: patch: support user implementations of Array in setArray()
Next
From: Tom Lane
Date:
Subject: Re: Prepared Statements