Re: WIP: default values for function parameters

Поиск
Список
Период
Сортировка
От David E. Wheeler
Тема Re: WIP: default values for function parameters
Дата
Msg-id 426A6C94-0E76-4E14-99A7-6E4524D40062@kineticode.com
обсуждение исходный текст
Ответ на Re: WIP: default values for function parameters  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: WIP: default values for function parameters  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
On Dec 14, 2008, at 6:55 AM, Tom Lane wrote:

>> The whole relabeling thing seems like a seriously silly idea.
>
> I wouldn't say that it's silly.  What I do say is that it makes no  
> sense
> to imagine that it would be used at the same time as named parameters.
> The entire point of something like XMLELEMENT is that it takes a  
> list of
> undifferentiated parameters, which therefore do not need to have names
> so far as the function is concerned.

Perhaps not, but I have to say, looking at Robert's JSON example:

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

I would be pretty confused. It looks exactly like the proposed syntax  
for named parameters. So while syntactically they may never be used  
together, there's a semantic mismatch, IMHO.

Best,

David


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

Предыдущее
От: James Mansion
Дата:
Сообщение: Re: Mostly Harmless: Welcoming our C++ friends
Следующее
От: Mark Mielke
Дата:
Сообщение: Re: Sync Rep: First Thoughts on Code