Re: Trigger with WHEN clause (WIP)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Trigger with WHEN clause (WIP)
Дата
Msg-id 5572.1255701727@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Trigger with WHEN clause (WIP)  (Peter Eisentraut <peter_e@gmx.net>)
Ответы Re: Trigger with WHEN clause (WIP)
Re: Trigger with WHEN clause (WIP)
Список pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> On Fri, 2009-10-16 at 09:31 +0100, Simon Riggs wrote:
>> * It will reduce size of in-memory pending trigger list (for large
>> statements)

> But this won't be the outcome when it's implemented the way it is being
> proposed, which checks the where clause just before executing the
> trigger function.

Hm, the feature could actually be worth something if it allows
conditions to be checked before an AFTER trigger event gets pushed
into the event list.  However, if it's not doing that ...

I note BTW that we have some ad-hoc logic already that arranges to
suppress queuing of AFTER events for FK triggers, if the FK column
value has not changed.  It might be interesting to look at whether
that hack could be unified with the user-accessible feature.  It's
essentially a WHEN OLD.x IS NOT DISTINCT FROM NEW.x test.
        regards, tom lane


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

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: Trigger with WHEN clause (WIP)
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: Trigger with WHEN clause (WIP)