Pgsql conditions do not short circuit? - Mailing list pgsql-interfaces

From Guy Rouillier
Subject Pgsql conditions do not short circuit?
Date
Msg-id CC1CF380F4D70844B01D45982E671B2348E5E5@mtxexch01.add0.masergy.com
Whole thread Raw
Responses Re: Pgsql conditions do not short circuit?
List pgsql-interfaces
I have the following condition in a trigger function:
 IF (TG_OP = 'INSERT') OR (TG_OP = 'UPDATE' AND NEW.aggregate_flag !=
OLD.aggregate_flag)

When I cause this trigger to execute on an insert, it complains that OLD
is not defined yet.  If I reformat this so I check the last condition in
an IF nested in the "UPDATE" case, it works fine.  From this, I'm
concluding that pgsql conditions do not short circuit?

--
Guy Rouillier



pgsql-interfaces by date:

Previous
From: Tom Lane
Date:
Subject: Re: Help with adding C-Language Functions
Next
From: Peter Eisentraut
Date:
Subject: Re: Pgsql conditions do not short circuit?