Re: Short-circuit boolean evaluation

From: pasman pasmański <pasman(dot)p(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Short-circuit boolean evaluation
Date: 2011-04-30 14:27:10
Message-ID: BANLkTimuc4=Scmw7b11q5ztbHXqLT9KTgQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

No.

2011/4/30, Jon Smark <jon(dot)smark(at)yahoo(dot)com>:
> Hi,
>
> Does Postgresql perform short-circuit boolean evaluation both in SQL
> and PL/pgSQL functions? As an example, suppose I have a function called
> "do_stuff" which is computationally intensive. In the example below,
> will it be called for rows for which the first predicate (foobar.id = $1)
> is false?
>
> SELECT count(*) FROM foobar WHERE foobar.id = $1 AND do_stuff (foobar.name);
>
> Thanks!
> Jon
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>

--
------------
pasman

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David Johnston 2011-04-30 14:34:32 Re: Short-circuit boolean evaluation
Previous Message Jon Smark 2011-04-30 13:58:31 Short-circuit boolean evaluation