Re: Allow WHEN in INSTEAD OF triggers

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Allow WHEN in INSTEAD OF triggers
Дата
Msg-id 16007.1577503755@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Allow WHEN in INSTEAD OF triggers  (David Fetter <david@fetter.org>)
Ответы Re: Allow WHEN in INSTEAD OF triggers  (David Fetter <david@fetter.org>)
Список pgsql-hackers
David Fetter <david@fetter.org> writes:
> While noodling around with an upcoming patch to remove user-modifiable
> RULEs, I noticed that WHEN conditions were disallowed from INSTEAD OF
> triggers for no discernible reason. This patch removes that
> restriction.

This seems like a remarkably bad idea.  The point of an INSTEAD OF
trigger is that it is guaranteed to handle the operation.  What's
the system supposed to do with rows the trigger doesn't handle?

I notice that your patch doesn't even bother to test what happens,
but I'd argue that whatever it is, it's wrong.  If you think that
"do nothing" or "throw an error" is appropriate, you can code that
inside the trigger.  It's not PG's charter to make such a decision.

            regards, tom lane

PS: I think your chances of removing rules are not good, either.



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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Allow WHEN in INSTEAD OF triggers
Следующее
От: John Naylor
Дата:
Сообщение: Re: use CLZ instruction in AllocSetFreeIndex()