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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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 Content-Type Size
variadic.2.0.2.diff text/x-patch 42.4 KB

In response to

Responses

Browse pgsql-patches by date

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