Re: Why is this SELECT evaluated?

Поиск
Список
Период
Сортировка
От Christophe Pettus
Тема Re: Why is this SELECT evaluated?
Дата
Msg-id 9E4FC9FF-D2EF-482C-B35A-93DCD01269B0@thebuild.com
обсуждение исходный текст
Ответ на Why is this SELECT evaluated?  (Miles Elam <miles.elam@productops.com>)
Список pgsql-general

> On Jan 28, 2023, at 11:29, Miles Elam <miles.elam@productops.com> wrote:
> Why does this error result?

While the standard order of operations is to evaluate the WHERE before the SELECT list, it's not guaranteed to result
inshort-cut execution.  In particular, constant folding happens very early in the processing of a query, well before
theWHERE clause is evaluated: 

xof=# SELECT 1/0 WHERE FALSE;
ERROR:  division by zero




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

Предыдущее
От: Erik Wienhold
Дата:
Сообщение: Re: Sequence vs UUID
Следующее
От: Benedict Holland
Дата:
Сообщение: Re: Sequence vs UUID