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-26 05:10:59 |
Message-ID: | Pine.LNX.4.44.0401260603362.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:
> expression "a,b". It's "fixed" by just declaring "," special inside function
> calls. If you want to use the operator in the function call you have to use an
> extra set of parentheses.
Well, it would work. It's just that it felt like such a big hack that I
didn't want to touch it at first. In general if one adds one thing like
this after another, we end up like some other database with lots of
strange ugly features.
> I'm sure that's a bit harder when you want => to be a regular identifier
> outside of a function call.
It doesn't have to be very hard to parse it. One can just parse it as an
expression and have a transformation phase that checks if the expression
is a top level "=>" with a single identifier to the left. If it is we
transform it to named argument. Probably one also need to record if the
top level expression is in () and set a flag to not trigger the above
logic.
--
/Dennis Björklund
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2004-01-26 05:13:53 | Re: What's left? |
Previous Message | Tom Lane | 2004-01-26 05:00:37 | Re: Disaster! |