Re: Named arguments in function calls

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Named arguments in function calls
Дата
Msg-id 29456.1075076468@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Named arguments in function calls  (Greg Stark <gsstark@mit.edu>)
Список 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 по дате отправления:

Предыдущее
От: Neil Conway
Дата:
Сообщение: Re: Named arguments in function calls
Следующее
От: Shachar Shemesh
Дата:
Сообщение: Tom lane - your email server is broken