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-20 23:11:47 |
Message-ID: | 22917.1095721907@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Laszlo Hornyak <kocka(at)forgeahead(dot)hu> writes:
> I have a error callback function registered to run each time an SQL
> error occurs. The problem is that the errfinish() calls it both if the
> executed SQL statement was wrong, and if the statem,ent or plan logging
> is enabled, and it seems elog.h doesn't provide the API to find out the
> reason why my callback was called.
I suspect you are abusing the callback mechanism to do something it was
not intended for. Callbacks are supposed to supply information for the
error message context field, *and nothing else*. You'll probably break
things if you go outside that charter. Accordingly, I see no reason why
a callback should care why it was called.
What are you trying to accomplish, really?
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Gaetano Mendola | 2004-09-21 00:46:34 | Re: RSS |
Previous Message | Bruce Momjian | 2004-09-20 22:28:12 | Re: Disabling bgwriter on my notebook |