From: Tom Lane <tgl@sss.pgh.pa.us>
To: emilu@encs.concordia.ca
Cc: Amos Hayes <ahayes@polkaroo.net>
Cc: pgsql-sql@postgresql.org
Subject: Re: Find min and max values across two columns?
Date: Mon, 15 May 2006 20:08:05 -0400
Message-ID: <441.1147738085@sss.pgh.pa.us> (raw)
In-Reply-To: <4468F558.7070407@encs.concordia.ca>
References: <DAD4674C-1896-4F24-B43B-B884491DB931@polkaroo.net>
<9558.1143234035@sss.pgh.pa.us>
<4468F558.7070407@encs.concordia.ca>
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 of
case when x>y then x else y end
regards, tom lane
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: tgl@sss.pgh.pa.us, emilu@encs.concordia.ca, ahayes@polkaroo.net
Subject: Re: Find min and max values across two columns?
In-Reply-To: <441.1147738085@sss.pgh.pa.us>
* 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