idea: allow AS label inside ROW constructor

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема idea: allow AS label inside ROW constructor
Дата
Msg-id CAFj8pRB1T1W6g0sppn-jEtyzJPLUUz_FxtNbme5Okd3XxVFx_w@mail.gmail.com
обсуждение исходный текст
Ответы Re: idea: allow AS label inside ROW constructor
Re: idea: allow AS label inside ROW constructor
Список pgsql-hackers
Hi

with new functions row_to_json(b), there is more often usage of ROW constructor. Using names in fields is relative difficult. Because ROW has special clause in parser, I am thinking so we can enable labeling inside ROW constructor

so instead currently supported:

select row_to_json(r) from (select 10 as a, 20 as b) r;

users can to write:

select row_to_json(row(10 as a,20 as b));

labeling will be enabled "only" inside ROW constructor. I don't propose enable it everywhere.

What do you think about it?

Regards

Pavel

Currently supported syntax is natural for long time PostgreSQL user, but it is relative strange for usual user.

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

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: Function array_agg(array)
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: idea: allow AS label inside ROW constructor