Re: Short-circuit boolean evaluation - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: Short-circuit boolean evaluation
Date
Msg-id 20110430144024.GB11855@svana.org
Whole thread Raw
In response to Re: Short-circuit boolean evaluation  (David Johnston <polobo@yahoo.com>)
List pgsql-general
On Sat, Apr 30, 2011 at 10:34:32AM -0400, David Johnston wrote:
> No. It will not be called
> Or
> No. Postgresql does not short-circuit boolean evaluations
> ?

SQL is a somewhat declarative language. There is no "order" to
evaluation as such. So you can't talk about short circuiting either.
This applies to any SQL database.

You can somewhat enforce order with subselects and CASE and other such
constructs.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patriotism is when love of your own people comes first; nationalism,
> when hate for people other than your own comes first.
>                                       - Charles de Gaulle

Attachment

pgsql-general by date:

Previous
From: David Johnston
Date:
Subject: Re: Short-circuit boolean evaluation
Next
From: Joel Reymont
Date:
Subject: histogram