From: Kris Jurka <books@ejurka.com>
To: Thomas Kellerer <spam_eater@gmx.net>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: 9.3 and extended constraint error information
Date: Tue, 10 Sep 2013 18:40:52 -0400 (EDT)
Message-ID: <alpine.BSO.2.03.1309101837150.15199@ejurka.com> (raw)
In-Reply-To: <l0o51j$uvq$1@ger.gmane.org>
References: <l0o51j$uvq$1@ger.gmane.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-jdbc>
On Wed, 11 Sep 2013, Thomas Kellerer wrote:
> I was wondering if the new extended constraint error information[1] will be
> exposed through JDBC in the next version of the driver?
>
Yes,
https://github.com/pgjdbc/pgjdbc/commit/e9ac5f8d964202ab5d43e401d74dcd76cefd112e
It's a little messy to get access to these fields with something like:
} catch (SQLException sqle) {
if (sqle instanceof PSQLException) {
PSQLException psqle = (PSQLException)sqle;
ServerErrorMessage s = psqle.getServerErrorMessage();
// Not all PSQLExceptions come from the server...
if (s != null) {
System.err.println(s.getColumn());
}
}
}
Kris Jurka
--
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: books@ejurka.com, spam_eater@gmx.net
Subject: Re: 9.3 and extended constraint error information
In-Reply-To: <alpine.BSO.2.03.1309101837150.15199@ejurka.com>
References: <l0o51j$uvq$1@ger.gmane.org> <alpine.BSO.2.03.1309101837150.15199@ejurka.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox