Skip site navigation (1) Skip section navigation (2)

Re: elog in 7.4

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Laszlo Hornyak <kocka(at)forgeahead(dot)hu>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: elog in 7.4
Date: 2004-09-21 13:44:38
Message-ID: 147.1095774278@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Laszlo Hornyak <kocka(at)forgeahead(dot)hu> writes:
> I am implementing a java language handler. If unrecoverable error occurs,
> it needs to send a signal to the java process, so it can stop the
> execution of the stored procedure, otherwise it would stay in inconsystent
> state.

Well, an elog callback is certainly the wrong place for that.  Even if
it looked to see whether the elog call was ERROR or not, an ERROR is no
longer necessarily unrecoverable --- it might be caught inside a plpgsql
exception block, for example, and not really be an error at all from the
perspective of calling code.

The right way would be to use PG_TRY to catch the exception as it
propagates out to your own level of control.

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Alvaro HerreraDate: 2004-09-21 13:44:43
Subject: Re: SSL Support
Previous:From: Sudhakar KurumellaDate: 2004-09-21 12:58:25
Subject: Re: psql: FATAL: Password authentication failed for

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group