Re: Triggers on columns - Mailing list pgsql-hackers

From Kevin Grittner
Subject Re: Triggers on columns
Date
Msg-id 4AA6260C020000250002AB65@gw.wicourts.gov
Whole thread Raw
In response to Re: Triggers on columns  (David Fetter <david@fetter.org>)
Responses Re: Triggers on columns
Re: Triggers on columns
List pgsql-hackers
David Fetter <david@fetter.org> wrote: 
> CREATE TRIGGER trig BEFORE UPDATE ON tbl FOR EACH ROW
>     WHEN (NEW.col IS DISTINCT FROM OLD.col)
>         EXECUTE PROCEDURE trigger_func();
How much does that buy you versus including this at the start of
trigger_func:
IF (NEW.col IS NOT DISTINCT FROM OLD.col) THEN RETURN NEW;
END IF;
What about the desire (mentioned up-thread) to test whether a column
was the target of an update SET list within the trigger function?
-Kevin


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: integer input functions : interesting limit behaviour
Next
From: Martin Gainty
Date:
Subject: Re: [GENERAL] Adding integers ( > 8 bytes) to an inet