Re: variadic function support - Mailing list pgsql-patches

From Andrew Dunstan
Subject Re: variadic function support
Date
Msg-id 48605C1C.8090300@dunslane.net
Whole thread Raw
In response to Re: variadic function support  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: variadic function support  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches

Tom Lane wrote:
> Andrew Dunstan <andrew@dunslane.net> writes:
>
>> Tom Lane wrote:
>>
>>> What would you consider "proper and full support"?
>>>
>> I don't know. But this doesn't feel like it.
>>
>
> That's a fairly weak argument for rejecting a patch that provides a
> feature many people have asked for.
>

OK. Let me be a bit more specific. I think (forcing myself to be a bit
more analytic than I have been up to now) my main objection is that the
variadic part of the parameters should be marked explicitly in the
formal parameter list.

I don't mind having it limited to a single typed array - as you say we
probably don't want someone implementing sprintf.

But if I have

  foo( a text, b int[])

it looks odd if both these calls are legal:

  foo('a',1,2,3,)
  foo('a',ARRAY[1,2,3])

which I understand would be the case with the current patch.

I'm also still curious to know how the following would be handled:

  foo(a text[], b text[])

cheers

andrew



pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: variadic function support
Next
From: Tom Lane
Date:
Subject: Re: variadic function support