Search Postgresql Archives

Re: Why is this SELECT evaluated?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> On Jan 28, 2023, at 11:29, Miles Elam <miles.elam@xxxxxxxxxxxxxx> 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 in short-cut execution.  In particular, constant folding happens very early in the processing of a query, well before the WHERE clause is evaluated:

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







[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux