David Fetter <da...@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

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to