Unix Technical Forum

Message / Error Handler

This is a discussion on Message / Error Handler within the pgsql Interfaces jdbc forums, part of the PostgreSQL category; --> Is there a way to register a message / error handler within my java code that will capture any ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Interfaces jdbc

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-16-2008, 12:31 AM
Votilla, Mike # Pittsburgh
 
Posts: n/a
Default Message / Error Handler

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


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-16-2008, 12:31 AM
Kris Jurka
 
Posts: n/a
Default Re: Message / Error Handler



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

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 08:36 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com