Short-circuit boolean evaluation

Поиск
Список
Период
Сортировка
От Jon Smark
Тема Short-circuit boolean evaluation
Дата
Msg-id 471279.1444.qm@web112813.mail.gq1.yahoo.com
обсуждение исходный текст
Ответы Re: Short-circuit boolean evaluation  (pasman pasmański <pasman.p@gmail.com>)
Список pgsql-general
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


В списке pgsql-general по дате отправления:

Предыдущее
От: Greg Smith
Дата:
Сообщение: Re: Switching Database Engines
Следующее
От: pasman pasmański
Дата:
Сообщение: Re: Short-circuit boolean evaluation