From: Kris Jurka <books@ejurka.com>
To: Steven Schlansker <stevenschlansker@gmail.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Extracting more useful information from PSQLException
Date: Fri, 28 Dec 2012 20:57:11 -0500 (EST)
Message-ID: <alpine.BSO.2.00.1212282053460.18287@leary.csoft.net> (raw)
In-Reply-To: <EA739659-106D-4601-9D14-17BFFE67D3FF@gmail.com>
References: <EA739659-106D-4601-9D14-17BFFE67D3FF@gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-jdbc>
On Fri, 28 Dec 2012, Steven Schlansker wrote:
> While designing web services that are backed by PostgreSQL, it is often
> helpful to report a more useful HTTP error than a generic "Something
> went wrong, sorry dude".
>
> Is it possible / would it be a good addition to expose structured SQL
> error information through JDBC? If such a thing does not exist, is this
> a feasible contribution? I expect it might require some hacking on the
> PostgreSQL server side to expose the error information in a structured
> manner. Or am I just dreaming too much, and this is not feasible?
>
There is currently a patch in progress and under discussion for the server
changes to expose this information. I would recommend reviewing this and
joining the discussion on -hackers if you have something useful to
contribute. I don't know anything about the patch other than that it
exists. I would be useful to see how much the JDBC driver would have to
change to take advantage of it.
https://commitfest.postgresql.org/action/patch_view?id=843
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, stevenschlansker@gmail.com
Subject: Re: Extracting more useful information from PSQLException
In-Reply-To: <alpine.BSO.2.00.1212282053460.18287@leary.csoft.net>
References: <EA739659-106D-4601-9D14-17BFFE67D3FF@gmail.com> <alpine.BSO.2.00.1212282053460.18287@leary.csoft.net>
* 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