Re: Issues for named/mixed function notation patch

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Issues for named/mixed function notation patch
Дата
Msg-id 5397.1254951955@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Issues for named/mixed function notation patch  (Jeff Davis <pgsql@j-davis.com>)
Ответы Re: Issues for named/mixed function notation patch  (Jeff Davis <pgsql@j-davis.com>)
Re: Issues for named/mixed function notation patch  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Jeff Davis <pgsql@j-davis.com> writes:
> If we allow calling a variadic function using named notation, the
> VARIADIC keyword is not strictly necessary, but I think we should
> require it. It seems strange without it.

Yeah.  My first thought was to just remove the check in
FuncnameGetCandidates, which would have the effect of matching with or
without VARIADIC.  It would be self-consistent but probably surprising.
But it should just be a small tweak to match only with VARIADIC.

> Pavel indicated that there may be some implementation difficulty in
> requiring the VARIADIC keyword when calling a variadic function using
> named notation:

I think what he was considering was the question of insisting that
the VARIADIC keyword be attached to the named argument that actually
matches the VARIADIC parameter.  I think we could do it, but it might
be a bit of a wart.  I notice that right now, an unnecessary VARIADIC
keyword in a regular positional call does not cause an error, it's just
ignored --- so we're already being a bit lax with it.
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Jeff Davis
Дата:
Сообщение: Re: Issues for named/mixed function notation patch
Следующее
От: Jeff Davis
Дата:
Сообщение: Re: Issues for named/mixed function notation patch