Re: Function in psql to Compare two numbers and return the bigger value

From: Steve Wampler <swampler(at)noao(dot)edu>
To: emilu(at)encs(dot)concordia(dot)ca
Cc: Bricklen Anderson <banderson(at)presinet(dot)com>, pgsql-general(at)postgresql(dot)org, adam(dot)r(at)sbcglobal(dot)net
Subject: Re: Function in psql to Compare two numbers and return the bigger value
Date: 2007-02-13 19:04:55
Message-ID: 45D20BD7.3070308@noao.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Emi Lu wrote:
> Does it mean it is not allowed to use "select greatest(12.6,3.8)" ?

It may mean you're not running 8.1? Here's what I get:
-----------------------------------------------------------
->psql
Welcome to psql 8.1.4, the PostgreSQL interactive terminal.

Type: \copyright for distribution terms
\h for help with SQL commands
\? for help with psql commands
\g or terminate with semicolon to execute query
\q to quit

swampler=# select GREATEST(6.3, 2.8);
greatest
----------
6.3
(1 row)

swampler=# select greatest(6.3, 2.8);
greatest
----------
6.3
(1 row)

swampler=#
-----------------------------------------------------------

--
Steve Wampler -- swampler(at)noao(dot)edu
The gods that smiled on your birth are now laughing out loud.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Magnus Hagander 2007-02-13 19:14:59 Re: PostgreSQL and OpenLdap
Previous Message Emi Lu 2007-02-13 18:58:51 Re: Function in psql to Compare two numbers and return the bigger value