RE: Re[2]: [SQL] Please help: How to determine largest of two num bers in a query? - Mailing list pgsql-sql

From Greg Youngblood
Subject RE: Re[2]: [SQL] Please help: How to determine largest of two num bers in a query?
Date
Msg-id 2B9713A99045D211BB4E0008C75668692EA712@SCORPEXC1.houstoncell.com
Whole thread Raw
List pgsql-sql
Many many thanks.. This is exactly what I was looking for.

I must be totally blind... Where can I find a list of the functions Postgres
already has.. I'm sure there has to be a way..

-----Original Message-----
From: Sferacarta Software [mailto:sferac@bo.nettuno.it]
Sent: Thursday, December 03, 1998 6:39 AM
To: Greg Youngblood; David Hartwig; 'PostgreSQL SQL List'
Subject: Re[2]: [SQL] Please help: How to determine largest of two
numbers in a query?
PostgreSQL has already these built-in funcions (those used on
aggregate MIN/MAX):

int2     |int2larger         |int2 int2     |larger of two
int2     |int2smaller        |int2 int2     |smaller of two

int4     |int4larger         |int4 int4     |larger of two

int4     |int4smaller        |int4 int4     |smaller of two

int8     |int8larger         |int8 int8     |larger of two

int8     |int8smaller        |int8 int8     |smaller of two

exemple:

SELECT int4larger(3,10)
int4larger
----------
        10
(1 row)

-Jose'-


pgsql-sql by date:

Previous
From: Michael Ansley
Date:
Subject: Optimizations
Next
From: Barracuda
Date:
Subject: RE: Re[2]: [SQL] Please help: How to determine largest of two num bers in a query?