pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kris Jurka <books@ejurka.com>
To: Votilla, Mike # Pittsburgh <Mike.Votilla@per-se.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Message / Error Handler
Date: Tue, 16 Jan 2007 16:16:25 -0500 (EST)
Message-ID: <Pine.BSO.4.64.0701161614150.27765@leary2.csoft.net> (raw)
In-Reply-To: <DC54B9E385D5D549B023EB9E4024EFAB094F876A@EXCHANGE1.dsa.int>
References: <DC54B9E385D5D549B023EB9E4024EFAB094F876A@EXCHANGE1.dsa.int>



On Tue, 16 Jan 2007, Votilla, Mike # Pittsburgh wrote:

> Is there a way to register a message / error handler within my java code
> that will capture any messages issued by a RAISE (debug, log, info etc)
> command from within a PL/pgSQL user defined function?
>

There is no specific callback provided, but RAISE output is available via 
Statement.getWarnings().  You also need to ensure that 
the level you RAISE at is at least that of client_min_messages to ensure 
that the server actually sends it to the JDBC driver.

Kris Jurka



view thread (2+ messages)

Message-ID: <Pine.BSO.4.64.0701161614150.27765@leary2.csoft.net>
Permalink:  ../Pine.BSO.4.64.0701161614150.27765@leary2.csoft.net/
Also on:    postgresql.org/message-id/Pine.BSO.4.64.0701161614150.27765@leary2.csoft.net

 · 

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: books@ejurka.com, Mike.Votilla@per-se.com
  Subject: Re: Message / Error Handler
  In-Reply-To: <Pine.BSO.4.64.0701161614150.27765@leary2.csoft.net>
  References: <DC54B9E385D5D549B023EB9E4024EFAB094F876A@EXCHANGE1.dsa.int> <Pine.BSO.4.64.0701161614150.27765@leary2.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