Reference column alias for common expressions

Поиск
Список
Период
Сортировка
От Wood May
Тема Reference column alias for common expressions
Дата
Msg-id KL1PR0601MB3921757C9EBCDCEBC575024184D79@KL1PR0601MB3921.apcprd06.prod.outlook.com
обсуждение исходный текст
Ответы Re: Reference column alias for common expressions
Re: Reference column alias for common expressions
Список pgsql-hackers
Hi,
    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?

    Thanks a lot!

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