Re: Evaluation of if conditions

From: Joe <dev(at)freedomcircle(dot)net>
To: Daniel CAUNE <d(dot)caune(at)free(dot)fr>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Evaluation of if conditions
Date: 2006-09-06 23:40:17
Message-ID: 44FF5C60.80601@freedomcircle.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2006-09-07 04:10:18 Re: Evaluation of if conditions
Previous Message Oisin Glynn 2006-09-06 23:04:36 Re: Evaluation of if conditions