Re: Issues for named/mixed function notation patch

Поиск
Список
Период
Сортировка
От Jeff Davis
Тема Re: Issues for named/mixed function notation patch
Дата
Msg-id 1254953396.16369.60.camel@monkey-cat.sm.truviso.com
обсуждение исходный текст
Ответ на Re: Issues for named/mixed function notation patch  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Issues for named/mixed function notation patch  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Brendan Jurd
Дата:
Сообщение: Re: Triggers on columns
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Issues for named/mixed function notation patch