Re: WIP: default values for function parameters

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: WIP: default values for function parameters
Дата
Msg-id 603c8f070812131934x520f4692v83440d97e3cc2eed@mail.gmail.com
обсуждение исходный текст
Ответ на Re: WIP: default values for function parameters  ("Greg Stark" <stark@enterprisedb.com>)
Список pgsql-hackers
> The whole relabeling thing seems like a seriously silly idea. Why is
> it at all a shortcut to use "AS" instead of "," ?

Because a lot of times you don't want to relabel, so you omit the "AS
label" part altogether, and the label is deduced from the expression
itself.  For example, I don't need to write:

SELECT json(r.foo AS foo, r.bar AS bar, r.baz AS baz, r.bletch AS
quux) FROM rel r;

I can just write:

SELECT json(r.foo, r.bar, r.baz, r.bletch AS quux) FROM rel r;

...which is a a lot more compact when the number of arguments is large.

...Robert


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

Предыдущее
От: Jeff Davis
Дата:
Сообщение: Re: Sync Rep: First Thoughts on Code
Следующее
От: Tatsuo Ishii
Дата:
Сообщение: Re: Sync Rep: First Thoughts on Code