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.