Re: Named arguments in function calls - Mailing list pgsql-hackers

From Dennis Bjorklund
Subject Re: Named arguments in function calls
Date
Msg-id Pine.LNX.4.44.0401252015580.30205-100000@zigo.dhs.org
Whole thread Raw
In response to Re: Named arguments in function calls  (Greg Stark <gsstark@mit.edu>)
Responses Re: Named arguments in function calls  (Greg Stark <gsstark@mit.edu>)
List pgsql-hackers
On 25 Jan 2004, Greg Stark wrote:

> > >  foo (x => 13, y => 42)
> > > 
> 
> Is it really necessary to steal it?

Yes, it is necessary since the arguments to a function are just 
expressions. If you do not the above would be ambigious and there is no 
clean way to fix that. Say that => is an operator returning a boolean, 
then the above could either be the function foo called with x=13 and y=42 
or the function foo called with two booleans.

We could of course make up some other syntax that does not involve => but 
then you loose compability with oracle.

I've not checked if there is anything similar in the sql2003 draft yet.  
I will do that of course. If someone has information about that, please
speak up.

-- 
/Dennis Björklund



pgsql-hackers by date:

Previous
From: Greg Stark
Date:
Subject: Re: Named arguments in function calls
Next
From: Tom Lane
Date:
Subject: Re: Named arguments in function calls