Re: Column level triggers - Mailing list pgsql-general

From Tom Lane
Subject Re: Column level triggers
Date
Msg-id 22798.1224087455@sss.pgh.pa.us
Whole thread Raw
In response to Re: Column level triggers  (Peter Eisentraut <peter_e@gmx.net>)
List 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 by date:

Previous
From: "Richard Broersma"
Date:
Subject: Re: NATURAL JOINs
Next
From: Bill Thoen
Date:
Subject: UPDATE and Indexes and Performance