Re: [GENERAL] plpgsql - or operator?

2008-07-09 Thread Richard Huxton
MadHatter wrote: If I have an expression (a or b)a where a=TRUE and b=FALSE, why is b evaluated? Any true operand before an or operator means the entire expression is true . There is no "before" - PG makes no guarantee about evaluation order. Don't forget a,b might well be subqueries and you

[GENERAL] plpgsql - or operator?

2008-07-08 Thread MadHatter
If I have an expression (a or b)a where a=TRUE and b=FALSE, why is b evaluated? Any true operand before an or operator means the entire expression is true . EXAMPLE create or replace function pinsusers() returns trigger as $$ declare msg varchar; begin