On Fri, Nov 20, 2009 at 5:05 PM, Tom Lane wrote:
> Robert Haas writes:
>> Random thought: would it be possible to use something like this to
>> optimize foreign key constraints, by not firing them if none of the
>> relevant columns have been updated?
>
> There already is code in there to do that;
On Fri, Nov 20, 2009 at 3:38 PM, Tom Lane wrote:
> Log Message:
> ---
> Add a WHEN clause to CREATE TRIGGER, allowing a boolean expression to be
> checked to determine whether the trigger should be fired.
>
> For BEFORE triggers this is mostly a matter of spec compliance; but for AFTER
> t