pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jojo Paderes <jojo.paderes@gmail.com>
To: pgsql-jdbc@postgresql.org
Subject: Re: Detailed Stored Proc Exception Message at JDBC Layer
Date: Sat, 5 Nov 2005 21:16:32 +0800
Message-ID: <65f9ddfb0511050516h214782ffq7f1e9b478208db9d@mail.gmail.com> (raw)
In-Reply-To: <Pine.BSO.4.61.0511050723200.2846@leary.csoft.net>
References: <65f9ddfb0511050355s343df7d4k1667bcd28826ef1e@mail.gmail.com>
	<Pine.BSO.4.61.0511050723200.2846@leary.csoft.net>

Hi Kris,

Adding the "?loglevel=1" to the connection url works well. The "W"
information is sufficient to help the Java developers debug/trace the
problem on the database functions. Thanks for pointing out this
solution! :-)

regards,

jojo

On 11/5/05, Kris Jurka <books@ejurka.com> wrote:
>
> We recently added some more detail to the default exception message, but
> unfortunately that does not cover the specific case you're interested in.
> We've got a lot of fields to choose from and don't want to overwhelm a
> user:
>
> http://www.postgresql.org/docs/8.0/static/protocol-error-fields.html
>
> To get the 'W' or "Where" information you need to increase the driver's
> loglevel via a URL parameter.  Try adding "?loglevel=1" to your connection
> string.  If your application is pg specific and you're using a recent
> driver version you may test if a thrown SQLException is in fact a
> PSQLException and then see if it has an available ServerErrorMessage
> object available which will have all of the fields mentioned above.  For
> debugging functions you may also need the 'p' and 'q' fields (internal
> query/position) which require going up to a loglevel of 2.  Unfortunately
> this spits out a whole bunch of other junk as the driver runs.
>
> It seems we should consider adding W, p, and q messages to the default
> error message or add a new URL parameter like verboseExceptions=true.
> Thoughts?
>
> Kris Jurka
>


view thread (3+ messages)

Message-ID: <65f9ddfb0511050516h214782ffq7f1e9b478208db9d@mail.gmail.com>
Permalink:  ../65f9ddfb0511050516h214782ffq7f1e9b478208db9d@mail.gmail.com/
Also on:    postgresql.org/message-id/65f9ddfb0511050516h214782ffq7f1e9b478208db9d@mail.gmail.com

 · 

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: jojo.paderes@gmail.com
  Subject: Re: Detailed Stored Proc Exception Message at JDBC Layer
  In-Reply-To: <65f9ddfb0511050516h214782ffq7f1e9b478208db9d@mail.gmail.com>
  References: <65f9ddfb0511050355s343df7d4k1667bcd28826ef1e@mail.gmail.com> <Pine.BSO.4.61.0511050723200.2846@leary.csoft.net> <65f9ddfb0511050516h214782ffq7f1e9b478208db9d@mail.gmail.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