Re: Issues for named/mixed function notation patch - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Issues for named/mixed function notation patch
Date
Msg-id 5397.1254951955@sss.pgh.pa.us
Whole thread Raw
In response to Re: Issues for named/mixed function notation patch  (Jeff Davis <pgsql@j-davis.com>)
Responses 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>)
List 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 by date:

Previous
From: Jeff Davis
Date:
Subject: Re: Issues for named/mixed function notation patch
Next
From: Jeff Davis
Date:
Subject: Re: Issues for named/mixed function notation patch