Re: WIP: default values for function parameters - Mailing list pgsql-hackers

From David E. Wheeler
Subject Re: WIP: default values for function parameters
Date
Msg-id 426A6C94-0E76-4E14-99A7-6E4524D40062@kineticode.com
Whole thread Raw
In response to Re: WIP: default values for function parameters  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: WIP: default values for function parameters  (Peter Eisentraut <peter_e@gmx.net>)
List 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 by date:

Previous
From: James Mansion
Date:
Subject: Re: Mostly Harmless: Welcoming our C++ friends
Next
From: Mark Mielke
Date:
Subject: Re: Sync Rep: First Thoughts on Code