| От | Tom Lane |
|---|---|
| Тема | Re: tg_trigtuple not NULL in AFTER STATEMENT triggers? |
| Дата | |
| Msg-id | 25642.1154365564@sss.pgh.pa.us обсуждение |
| Ответ на | Re: tg_trigtuple not NULL in AFTER STATEMENT triggers? (Michael Fuhr <mike@fuhr.org>) |
| Список | pgsql-hackers |
Michael Fuhr <mike@fuhr.org> writes:
> On Mon, Jul 31, 2006 at 11:12:14AM -0400, Tom Lane wrote:
>> Michael Fuhr <mike@fuhr.org> writes:
>>> I've noticed that tg_trigtuple and tg_newtuple aren't cleared to
>>> NULL in AFTER STATEMENT triggers. Is that an oversight,
>>
>> Probably. Send a patch?
> Sure. Is the switch in AfterTriggerExecute() around line 2116 in
> commands/trigger.c close to where I should be looking?
Yeah, it looks like some attention needs to be paid to whether
ate_oldctid and ate_newctid were supplied, rather than just blindly
passing pointers to possibly-uninitialized local structs.
Offhand I think you could remove the "switch" entirely in favor of
driving the setup of these fields off the "if (ItemPointerIsValid(..."
tests.
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера