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

From Fernando Nasser
Subject Re: Detecting 'socket errors' - closing the Connection object
Date
Msg-id 3F1D6F79.9040402@redhat.com
Whole thread Raw
In response to Fix for receiving empty query errors.  (Kim Ho <kho@redhat.com>)
List pgsql-jdbc
David Wall wrote:
>
> Again, I'm okay with closing it myself if there were an obvious way to
> detect that a given SQLException was in fact related to an unrecoverable I/O
> error.  It's just that simple.
>

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());



--
Fernando Nasser
Red Hat Canada Ltd.                     E-Mail:  fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario   M4P 2C9


pgsql-jdbc by date:

Previous
From: pginfo
Date:
Subject: Re: jdbc batch performance problem
Next
From: "David Wall"
Date:
Subject: Re: Detecting 'socket errors' - closing the Connection object