Re: max (timestamp,timestamp) - Mailing list pgsql-sql

From T E Schmitz
Subject Re: max (timestamp,timestamp)
Date
Msg-id 4559DAA2.9090908@numerixtechnology.de
Whole thread Raw
In response to Re: max (timestamp,timestamp)  (Michael Fuhr <mike@fuhr.org>)
List pgsql-sql
Michael Fuhr wrote:
> On Mon, Nov 13, 2006 at 07:29:09PM +0500, imad wrote:
> 
>>max (timestamptz, timestamptz) does not exist already. You need to
>>create a simple function in PLpgSQL something like
>>
>>if a > b
>>return a;
>>else
>>return b;
> 
> 
> Since PostgreSQL 8.1 you can use GREATEST:
> 
> test=> SELECT greatest(1, 2);

That'll be a handy feature! Unfortunately, my server is still on 7.4.


Thanks to everyone for the quick responses.
-- 


Regards,

Tarlika


pgsql-sql by date:

Previous
From: "Stuart Brooks"
Date:
Subject: Re: Constraint on multicolumn index
Next
From: Bricklen Anderson
Date:
Subject: Re: hiding column values for specific rows