Re: Detecting 'socket errors' - closing the Connection object - Mailing list pgsql-jdbc

From David Wall
Subject Re: Detecting 'socket errors' - closing the Connection object
Date
Msg-id 03c201c35075$574bffa0$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());

Thanks, Fernando.  Unfortunately, this will be a postgresql-ism, not a JDBC
library-ism, and it will likely require that the user be on a particular
version of the database, too (or is this bit going to work even on 7.3 and
pre 7.3 versions too?).  I'm looking for something that doesn't require a
special patch for each of the myriad databases our customers use (MSFT SQL
Server, Oracle, PostgreSQL MySQL and DB2/UDB to name the current list).

David


pgsql-jdbc by date:

Previous
From: "David Wall"
Date:
Subject: Re: Detecting 'socket errors' - closing the Connection object
Next
From: Barry Lind
Date:
Subject: Re: the IN clause saga