Re: proposal: variadic argument support for least, greatest function - Mailing list pgsql-hackers

From Pavel Stehule
Subject Re: proposal: variadic argument support for least, greatest function
Date
Msg-id CAFj8pRA7E8a+uqLZvy=B+672PiTAWr7_7Tv1yo2y5NaSKJJqtQ@mail.gmail.com
Whole thread Raw
In response to Re: proposal: variadic argument support for least, greatest function  (Vik Fearing <vik.fearing@2ndquadrant.com>)
List pgsql-hackers


so 10. 11. 2018 v 19:12 odesílatel Vik Fearing <vik.fearing@2ndquadrant.com> napsal:
On 08/11/2018 15:59, Pavel Stehule wrote:
> Hi
>
> We can pass variadic arguments as a array to any variadic function. But
> some our old variadic functions doesn't supports this feature.
>
> We cannot to write
>
> SELECT least(VARIADIC ARRAY[1,2,3]);
>
> Attached patch add this possibility to least, greatest functions.

Is there any particular reason you didn't just make least and greatest
actual functions?

These functions has are able to use most common type and enforce casting. Generic variadic function cannot do it.

Regards

Pavel


--
Vik Fearing                                          +33 6 46 75 15 36
http://2ndQuadrant.fr     PostgreSQL : Expertise, Formation et Support

pgsql-hackers by date:

Previous
From: Andrew Gierth
Date:
Subject: Re: proposal: variadic argument support for least, greatest function
Next
From: Dmitry Dolgov
Date:
Subject: Re: [HACKERS] Fix performance degradation of contended LWLock on NUMA