Re: column alias and group by/having/order

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: column alias and group by/having/order
Дата
Msg-id 2373.1076685331@sss.pgh.pa.us
обсуждение исходный текст
Ответ на column alias and group by/having/order  (Tomasz Myrta <jasiek@klaster.net>)
Список pgsql-sql
Tomasz Myrta <jasiek@klaster.net> writes:
> I found some strange column alias behaviour:

That's how it is.  The fact that you can reference output-column aliases
at all in GROUP BY or ORDER BY is a wart, because it conflicts with the
logical model of query evaluation --- the output list should be computed
last.  We have extended the SQL92 requirement (unadorned aliases in
ORDER BY) to allow the same in GROUP BY, but we don't take it to the
level of allowing them inside arbitrary expressions.
        regards, tom lane


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

Предыдущее
От: Stephan Szabo
Дата:
Сообщение: Re: 7.4 - FK constraint performance
Следующее
От: Tom Lane
Дата:
Сообщение: Re: 7.4 - FK constraint performance