Message / Error Handler

Поиск
Список
Период
Сортировка
Искать

Message / Error Handler

От:
"Votilla, Mike # Pittsburgh" <Mike.Votilla@per-se.com>
Дата:

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?

 

Thanks for any help or direction.

 

Mike

Re: Message / Error Handler

От:
Kris Jurka <books@ejurka.com>
Дата:


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
FAQ