Re: elog in 7.4
От | Tom Lane |
---|---|
Тема | Re: elog in 7.4 |
Дата | |
Msg-id | 22917.1095721907@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | elog in 7.4 (Laszlo Hornyak <kocka@forgeahead.hu>) |
Список | pgsql-hackers |
Laszlo Hornyak <kocka@forgeahead.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
В списке pgsql-hackers по дате отправления: