Re: BUG #14079: Issues with query

Поиск
Список
Период
Сортировка
От John R Pierce
Тема Re: BUG #14079: Issues with query
Дата
Msg-id 570836F3.9090603@hogranch.com
обсуждение исходный текст
Ответ на BUG #14079: Issues with query  (hector.bejarano@gmail.com)
Список pgsql-bugs
On 4/8/2016 2:47 PM, hector.bejarano@gmail.com wrote:
> This query works:
> select 1 as a
>
> But this one fails:
> select 1 as a where a = 1
>
> And I think they should both work.


nope.      doesn't work that way.   Aliases to selected fields can not
be used in the WHERE clause, because the WHERE clause is executed BEFORE
the fields are selected and calculated.

this is per the SQL standard.


--
john r pierce, recycling bits in santa cruz

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