Re: What can I use as a [non-aggregate] minimum function - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: What can I use as a [non-aggregate] minimum function
Date
Msg-id 20011211152251.A771@svana.org
Whole thread Raw
In response to Re: What can I use as a [non-aggregate] minimum function  (Chris Albertson <chrisalbertson90278@yahoo.com>)
List pgsql-general
On Mon, Dec 10, 2001 at 09:07:28PM -0800, Chris Albertson wrote:
>
> All you need is a "max" function with two arguments.  To find the
> max of four numbers you can do this
>
>             max(max(max(a,b),c),d)
>
> It is not even all that ugly.

This function even exists, though it's called int4larger. I know the
function exists but I can never remember the name and have to scan through
the function list each time to find it.

There's also cashlarger, date_larger, float4larger, float8larger,
int2larger, int8larger, interval_larger, numeric_larger, text_larger,
time_larger, timestamp_larger and timetz_larger. (Consistant naming huh?).
The opposites are *smaller.

HTH,
--
Martijn van Oosterhout <kleptog@svana.org>
http://svana.org/kleptog/
> Terrorists can only take my life. Only my government can take my freedom.

pgsql-general by date:

Previous
From: Chris Albertson
Date:
Subject: Re: What can I use as a [non-aggregate] minimum function
Next
From: Antonio Fiol Bonnín
Date:
Subject: Re: Analyzer for postgresql.log