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: "Florian G(dot) Pflug" <fgp(at)phlo(dot)org>, "Jeff Davis" <pgsql(at)j-davis(dot)com>, "Andrew Dunstan" <andrew(at)dunslane(dot)net>, pgsql-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: variadic function support
Date: 2008-07-14 22:15:01
Message-ID: 162867790807141515p7a09452fh16b1f637a89a7b85@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-patches
Hello

this version is WIP - I have to clean comments, and will do some
documentation. But I am sure, I am not able explain this feature in
english well. Please, can some body help me with documentation? So
now, plpgsql is more/less ruby :)

postgres=# select myleast(variadic array[1,2,3,4,-1]);
 myleast
---------
      -1
(1 row)

postgres=# select myleast(variadic array[1.1, -5.5]);
 myleast
---------
    -5.5
(1 row)

postgres=# --test with empty variadic call parameter
postgres=# select myleast(variadic array[]::int[]);
 myleast
---------

(1 row)
postgres=# select myleast(1.1,-5.5);
 myleast
---------
    -5.5

regards
Pavel

2008/7/14 Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>:
> 2008/7/14 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
>> "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com> writes:
>>> 2008/7/14 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
>>>> Are you intending to change this right now and resubmit, or is it
>>>> work for later?
>>
>>> I prefer separate it to other patch.
>>
>> It seems a fairly important part of the feature, especially given the
>> connection to the zero-argument issue.
>
> ok tomorrow I have some work, but I can do it to Friday.
>
> regards
> Pavel Stehule
>>
>>                        regards, tom lane
>>
>

Attachment: variadic.2.0.2.diff
Description: text/x-patch (42.4 KB)

In response to

Responses

pgsql-patches by date

Next:From: Bruce MomjianDate: 2008-07-14 22:52:41
Subject: Re: \d+ should display the storage options for columns
Previous:From: Tom LaneDate: 2008-07-14 20:22:48
Subject: Re: variadic function support

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