Re: ErrorContextCallback

From: Gavin Sherry <swm(at)linuxworld(dot)com(dot)au>
To: Laszlo Hornyak <kocka(at)forgeahead(dot)hu>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: ErrorContextCallback
Date: 2004-08-10 21:31:45
Message-ID: Pine.LNX.4.58.0408110728490.20149@linuxworld.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, 9 Aug 2004, Laszlo Hornyak wrote:

> Hi!
>
> Sorry if I post this mail to the wrong list, I checked each by it's
> theme and this seems to be the best.
> I have a strange problem with an errorcontextcallback:
> Given the following code fragment:
> mycallback->previous = error_context_stack;
> elog(DEBUG1,"1");
> mycallback->callback = plpgj_ErrorContextCallback;
> elog(DEBUG1,"2");
> mycallback->arg = "hello world!";
> elog(DEBUG1,"3");
> error_context_stack = mycallback;

Its only at the lijne above that you're updating error_context_stack.

> elog(DEBUG1,"4");

Every call to elog() (errfinish), calls the callbacks registered in
error_context_stack, if my memory serves me correctly.

It might not be relevant to the problem you're solving, but have you
looked at Tom's try/catch code in HEAD?

Gavin

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Serguei A. Mokhov 2004-08-10 22:01:52 Re: Missing French backend translations in the HEAD
Previous Message Tom Lane 2004-08-10 21:31:07 Re: PITR - Some data is not recovered.