Re: max (timestamp,timestamp)

From: T E Schmitz <mailreg(at)numerixtechnology(dot)de>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: max (timestamp,timestamp)
Date: 2006-11-14 15:02:58
Message-ID: 4559DAA2.9090908@numerixtechnology.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Bricklen Anderson 2006-11-14 18:43:02 Re: hiding column values for specific rows
Previous Message Stuart Brooks 2006-11-14 12:50:49 Re: Constraint on multicolumn index