From: T E Schmitz <mailreg@numerixtechnology.de>
To: pgsql-sql@postgresql.org
Subject: Re: max (timestamp,timestamp)
Date: Tue, 14 Nov 2006 15:02:58 +0000
Message-ID: <4559DAA2.9090908@numerixtechnology.de> (raw)
In-Reply-To: <20061113150643.GA34908@winnie.fuhr.org>
References: <45587718.2010009@numerixtechnology.de>
<20061113140828.GD14281@a-kretschmer.de>
<1f30b80c0611130629v4616365cr50c8fd99f01fce3a@mail.gmail.com>
<20061113150643.GA34908@winnie.fuhr.org>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: mailreg@numerixtechnology.de
Subject: Re: max (timestamp,timestamp)
In-Reply-To: <4559DAA2.9090908@numerixtechnology.de>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox