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

From Jeff Davis
Subject Re: Issues for named/mixed function notation patch
Date
Msg-id 1254953396.16369.60.camel@monkey-cat.sm.truviso.com
Whole thread Raw
In response to Re: Issues for named/mixed function notation patch  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Issues for named/mixed function notation patch  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Wed, 2009-10-07 at 17:45 -0400, Tom Lane wrote:
> 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.

>From a semantic standpoint, I lean towards requiring the VARIADIC
keyword consistently between named and positional notation.

It seems strange to me if we have a situation where changing the call:
 foo(a, b, VARIADIC c)

to be more explicit by using named call notation:
 foo(a AS x, b AS y, VARIADIC c AS z)

is "less correct" in the sense that the VARIADIC keyword goes from
"required" to "ignored".

Also, requiring VARIADIC seems to guard us better against future
changes, which seemed like a concern before.

I don't have a strong opinion or a specific problem with making VARIADIC
optional, so it's OK with me.

Regards,Jeff Davis





pgsql-hackers by date:

Previous
From: Brendan Jurd
Date:
Subject: Re: Triggers on columns
Next
From: Tom Lane
Date:
Subject: Re: Issues for named/mixed function notation patch