From: | Martijn van Oosterhout <kleptog(at)svana(dot)org> |
---|---|
To: | David Johnston <polobo(at)yahoo(dot)com> |
Cc: | pasman pasma??ski <pasman(dot)p(at)gmail(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Short-circuit boolean evaluation |
Date: | 2011-04-30 14:40:25 |
Message-ID: | 20110430144024.GB11855@svana.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)svana(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Joel Reymont | 2011-04-30 16:37:17 | histogram |
Previous Message | David Johnston | 2011-04-30 14:34:32 | Re: Short-circuit boolean evaluation |