Re: Named arguments in function calls

From: Dennis Bjorklund <db(at)zigo(dot)dhs(dot)org>
To: Greg Stark <gsstark(at)mit(dot)edu>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Named arguments in function calls
Date: 2004-01-25 19:29:06
Message-ID: Pine.LNX.4.44.0401252015580.30205-100000@zigo.dhs.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2004-01-25 19:54:12 Re: Named arguments in function calls
Previous Message Greg Stark 2004-01-25 17:38:28 Re: Named arguments in function calls