Re: elog in 7.4

From: Laszlo Hornyak <kocka(at)forgeahead(dot)hu>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: elog in 7.4
Date: 2004-09-22 13:02:22
Message-ID: Pine.LNX.4.58.0409221453440.25952@www.forgeahead.hu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Tom, is there other way in pg 7.4 than backporting PG_TRY? It seems a lot
of work.

Thanks,
Laszlo

On Tue, 21 Sep 2004, Tom Lane wrote:

> 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
>
> ---------------------------(end of broadcast)---------------------------
> TIP 7: don't forget to increase your free space map settings
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2004-09-22 13:04:24 Re: todo: comment field for pg users and groups
Previous Message Fabien COELHO 2004-09-22 11:15:42 todo: comment field for pg users and groups