Re: Find min and max values across two columns?

From: Emi Lu <emilu(at)encs(dot)concordia(dot)ca>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Find min and max values across two columns?
Date: 2006-05-16 14:44:07
Message-ID: 4469E537.6010108@encs.concordia.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Thank you Tom.

>Emi Lu <emilu(at)encs(dot)concordia(dot)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 of
> case when x>y then x else y end
>
> regards, tom lane
>
>---------------------------(end of broadcast)---------------------------
>TIP 6: explain analyze is your friend
>
>

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Risto Tamme 2006-05-16 21:01:02 table constraint + INSERT
Previous Message Jose Apablaza 2006-05-16 08:45:05 Re: MySQL DB to PostgresSQL DB