Suporte PK <fkno...@gmail.com> writes:
> IF TG_OP = 'UPDATE' AND OLD.field != NEW.field THEN
> ...
> The question is: if the trigger was not fired by an UPDATE event, 
> shouldn't it make the first test and then ignore the rest of the condition?

No.  This is a very very common error.  The behavior is not as
short-circuity as you'd think.  Break it into two IFs.

                        regards, tom lane

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

Reply via email to