Re: variadic function support

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, pgsql-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: variadic function support
Date: 2008-06-24 02:29:48
Message-ID: 48605C1C.8090300@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Tom Lane wrote:
> Andrew Dunstan <andrew(at)dunslane(dot)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

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2008-06-24 02:41:09 Re: variadic function support
Previous Message Tom Lane 2008-06-24 00:59:17 Re: variadic function support