Re: Largest & Smallest Functions - Mailing list pgsql-general

From Ken Tanzer
Subject Re: Largest & Smallest Functions
Date
Msg-id CAD3a31XqSmCk0nGy=j6dq62eGzDc0ztw-0BR+s2OmZ1oADr5+w@mail.gmail.com
Whole thread Raw
In response to Re: Largest & Smallest Functions  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-general
On Thu, Nov 8, 2018 at 7:01 AM Pavel Stehule <pavel.stehule@gmail.com> wrote:
 
postgres=# select smallest(VARIADIC ARRAY[1,2,3]);
┌──────────┐
│ smallest │
╞══════════╡
│        1 │
└──────────┘
(1 row)


That's very helpful and good to know. It's too bad that doesn't work with LEAST/GREATEST, which would eliminate the need for extra functions.

I sent a patch to pgsql-hackares that allows VARIADIC argument for LEAST/GREATEST


That's great!  Thanks for doing that!

Cheers,
Ken



--
AGENCY Software  
A Free Software data system
By and for non-profits
(253) 245-3801

learn more about AGENCY or
follow the discussion.

pgsql-general by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: Largest & Smallest Functions
Next
From: Ron
Date:
Subject: REINDEX CONCURRENT?