Re: Reference column alias for common expressions

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Reference column alias for common expressions
Дата
Msg-id 1651063.1653408222@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Reference column alias for common expressions  (Wood May <asdf_pg@outlook.com>)
Список pgsql-hackers
Wood May <asdf_pg@outlook.com> writes:
>     Some databases (like Teradata) support the following syntax:
>     select col1, col2*20 as col2_1, col2_1*200 as col3_1 from your_table;
>     The last element in the target list can refer the second one using its alias.
>     This feature is similar to some programming languages (like Lisp)'s let*​.
>     For Postgres, it seems the only way is to write a subquery and then a new target list.

>     Will Postgres plan to support this feature?

No.  It's flat out contrary to the SQL standard.

            regards, tom lane



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: PG15 beta1 sort performance regression due to Generation context change
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Improving connection scalability (src/backend/storage/ipc/procarray.c)