Re: Find min and max values across two columns? - Mailing list pgsql-sql

From Tom Lane
Subject Re: Find min and max values across two columns?
Date
Msg-id 441.1147738085@sss.pgh.pa.us
Whole thread Raw
In response to Re: Find min and max values across two columns?  (Emi Lu <emilu@encs.concordia.ca>)
Responses Re: Find min and max values across two columns?
List pgsql-sql
Emi Lu <emilu@encs.concordia.ca> writes:
> ERROR:  function greatest(integer, integer) does not exist
> HINT:  No function matches the given name and argument types. You may 
> need to add explicit type casts.

We added greatest/least in 8.1, but before that you can just use a
CASE expression instead, along the lines ofcase when x>y then x else y end
        regards, tom lane


pgsql-sql by date:

Previous
From: Scott Marlowe
Date:
Subject: Re: Find min and max values across two columns?
Next
From: Emi Lu
Date:
Subject: Re: Find min and max values across two columns?