Re: Bug #735: Server crash when using dynamic SQL and disabling recursion

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Bug #735: Server crash when using dynamic SQL and disabling recursion
Дата
Msg-id 4157.1029160228@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Bug #735: Server crash when using dynamic SQL and disabling recursion  (pgsql-bugs@postgresql.org)
Список pgsql-bugs
pgsql-bugs@postgresql.org writes:
> Following is the example of sql script that crashes server if you
> remove marked comments (this is not real code, just test one).
> May be i am doing something wrong???

Changing the trigger set on a relation from within a trigger on that
same relation is not a good plan.  When you return from the trigger,
the trigger-calling code is now holding a dangling pointer to
no-longer-valid trigger data.  Instant core dump.

I'm not clear on why you feel you need to do that, but I'd suggest
finding another way.  Perhaps a rule instead of a trigger?  Or redesign
your table structure to make the problem go away in the first place?

            regards, tom lane

В списке pgsql-bugs по дате отправления:

Предыдущее
От: pgsql-bugs@postgresql.org
Дата:
Сообщение: Bug #735: Server crash when using dynamic SQL and disabling recursion
Следующее
От: pgsql-bugs@postgresql.org
Дата:
Сообщение: Bug #736: Old bug is back!! Drop database bug