pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Thomas Kellerer <spam_eater@gmx.net>
To: pgsql-jdbc@postgresql.org
Subject: Re: 9.3 and extended constraint error information
Date: Wed, 11 Sep 2013 08:22:37 +0200
Message-ID: <l0p23v$t0v$1@ger.gmane.org> (raw)
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>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-jdbc>

Kris Jurka, 11.09.2013 00:40:
> 
> 
> 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());
>     }
>   }
> }

Ah, great. That's good enough for me.

Thanks for the feedback
Thomas





-- 
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc



view thread (3+ messages)

Message-ID: <l0p23v$t0v$1@ger.gmane.org>
Permalink:  ../l0p23v$t0v$1@ger.gmane.org/
Also on:    postgresql.org/message-id/l0p23v$t0v$1@ger.gmane.org

 · 

reply

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: spam_eater@gmx.net
  Subject: Re: 9.3 and extended constraint error information
  In-Reply-To: <l0p23v$t0v$1@ger.gmane.org>
  References: <l0o51j$uvq$1@ger.gmane.org> <alpine.BSO.2.03.1309101837150.15199@ejurka.com> <l0p23v$t0v$1@ger.gmane.org>

* 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