Re: Column level triggers

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Column level triggers
Дата
Msg-id 22798.1224087455@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Column level triggers  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-general
Peter Eisentraut <peter_e@gmx.net> writes:
> Scott Marlowe wrote:
>> Since you can check which columns have changed, it's pretty easy to
>> write a trigger that just skips its logic when none of the trigger
>> columns have changed.

> I think column-level triggers actually fire when one of the columns is
> written to, not only when the value there is distinct from the previous
> one.  This small difference is not easy to emulate by comparing OLD and
> NEW in the trigger body.

So what happens when one of the target columns is modified by another
trigger, rather than by the SQL query?  (For extra credit, what if it's
a trigger that comes after the column trigger in the firing order?)

            regards, tom lane

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

Предыдущее
От: "Richard Broersma"
Дата:
Сообщение: Re: NATURAL JOINs
Следующее
От: Bill Thoen
Дата:
Сообщение: UPDATE and Indexes and Performance