Re: Evaluation of if conditions - Mailing list pgsql-sql

From Joe
Subject Re: Evaluation of if conditions
Date
Msg-id 44FF5C60.80601@freedomcircle.net
Whole thread Raw
In response to Evaluation of if conditions  (Daniel CAUNE <d.caune@free.fr>)
List pgsql-sql
Daniel CAUNE wrote:
> Hi,
>
> How does the IF statement evaluate conditions?  Does it evaluate conditions
> following their declaration order from left to right?  In case of
> or-conditions, does the IF statement stop evaluating conditions whenever a
> first or-condition is true?
>   
Please see 4.2.12. Expression Evaluation Rules of the manual:

The order of evaluation of subexpressions is not defined. In particular, 
the inputs of an operator or function are not necessarily evaluated 
left-to-right or in any other fixed order.

There's more examples there too.

Joe


pgsql-sql by date:

Previous
From: "Gregory S. Williamson"
Date:
Subject: Re: Evaluation of if conditions
Next
From: Tom Lane
Date:
Subject: Re: Evaluation of if conditions