Re: Issues for named/mixed function notation patch

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: Jeff Davis <pgsql(at)j-davis(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Bernd Helmle <mailings(at)oopsware(dot)de>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Issues for named/mixed function notation patch
Date: 2009-09-27 18:28:19
Message-ID: 603c8f070909271128u7466df4emfd399d55c666d14c@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Sep 27, 2009 at 1:46 PM, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> wrote:
> 2009/9/27 Robert Haas <robertmhaas(at)gmail(dot)com>:
>> On Sun, Sep 27, 2009 at 12:37 AM, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> wrote:
>>>> "However, a named variadic argument can only be called the way shown in
>>>> the example above. The VARIADIC keyword must not be specified and a
>>>> variadic notation of all arguments is not supported. To use variadic
>>>> argument lists you must use positional notation instead."
>>>>
>>>> What is the intended behavior? I think we should always require VARIADIC
>>>> to be specified regardless of using named notation.
>>>>
>>>
>>> maybe we could to support variadic named parameters in future - then
>>> using VARIADIC keyword should be necessary - like
>>>
>>> foo(10 AS p1, 20 AS p1, 30 AS p3) is equalent of
>>> foo(VARIADIC ARRAY[10,20] AS p1, 30 AS p3)
>>
>> Pavel,
>>
>> This doesn't make sense to me, FWIW.  I don't think we should allow
>> parameters to be specified more than once.  It's hard for me to
>> imagine how that could be useful.
>
> ook I thing, so this should be little bit unclean too. I though why we
> need VARIADIC keyword mandatory for named notation. When we could
> specify only unique names, then we could use only one "packed"
> variadic parameter - and then VARIADIC keyword isn't necessary.
>
> Is this idea correct? I thing, so there are not problem ensure an
> using VARIADIC keyword in this context - but, personally I don't feel,
> so there it have to be. But I don't thing, so this is important
> (minimally for me) - I'll accept others opinions.

Sorry, I'm having trouble understanding what you're driving at here.
I think we should just not allow named notation to be combined with
VARIADIC, at least for a first version of this feature, either when
defining a function or when calling one. We can consider relaxing
that restriction at a later date if we can agree on what the semantics
should be.

...Robert

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2009-09-27 19:00:08 Re: Linux LSB init script
Previous Message Robert Haas 2009-09-27 18:23:38 Re: operator exclusion constraints [was: generalized index constraints]