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

From Tom Lane
Subject Re: Named arguments in function calls
Date
Msg-id 29456.1075076468@sss.pgh.pa.us
Whole thread Raw
In response to Re: Named arguments in function calls  (Greg Stark <gsstark@mit.edu>)
List pgsql-hackers
Greg Stark <gsstark@mit.edu> writes:
> Of course it's ambiguous. Just as f(a,b) is ambiguous in C. It could
> mean call f with two arguments, or it could mean call f with the
> result of the 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.

This doesn't apply very well to Postgres, though.  For us ',' is not a
legal operator name anywhere.  We used to have some conflicts between
punctuation and operator names --- at one point, there were actually
standard operators named ';' and ':' if you can believe that.  We got
rid of those cases because of the amount of pain they caused, and I'm
not eager to introduce a new one.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Neil Conway
Date:
Subject: Re: Named arguments in function calls
Next
From: Shachar Shemesh
Date:
Subject: Tom lane - your email server is broken