Skip site navigation (1) Skip section navigation (2)

Re: variadic function support

From: "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Andrew Dunstan" <andrew(at)dunslane(dot)net>, pgsql-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: variadic function support
Date: 2008-06-26 15:03:19
Message-ID: 162867790806260803i79d90437n6ad2fe02c5f3ea52@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-patches
2008/6/25 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
> "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com> writes:
>>> Tom Lane wrote:
>>>> Your point about the syntax is good though.  It would be better if
>>>> the syntax were like
>>>> create function foo (a text, variadic b int[])
>>>> or maybe even better
>>>> create function foo (a text, variadic b int)
>
>> I don't see problem with your syntax. It well block combination OUT
>> and VARIADIC parameter - my one request, variadic parameter have to be
>> array.
>
> Well, we should certainly store the parameter type as an array in
> proargtypes, because that makes this feature transparent to all the
> PLs.  However, it doesn't follow that the CREATE FUNCTION syntax
> has to specify the array type rather than the element type.  I think
> the Java precedent might be good reason to go with using the element
> type in the function declaration.
>
>                        regards, tom lane
>
Hello

this is third variant with variadic argumen as scalar. But I still
strongly prefer second variant with conformance declared variadic
array with used array variable.

Regards
Pavel Stehule

Attachment: variadic.2.2.1.diff
Description: text/x-patch (35.2 KB)

In response to

Responses

pgsql-patches by date

Next:From: Alvaro HerreraDate: 2008-06-26 15:04:34
Subject: Re: Fix pg_ctl restart bug
Previous:From: Josh BerkusDate: 2008-06-26 14:43:39
Subject: Re: [0/4] Proposal of SE-PostgreSQL patches

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group