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

From: "Adam Rich" <adam(dot)r(at)sbcglobal(dot)net>
To: <emilu(at)encs(dot)concordia(dot)ca>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: Function in psql to Compare two numbers and return the bigger value
Date: 2007-02-13 18:47:11
Message-ID: 007701c74f9f$5ff62630$6400a8c0@dualcore
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


You want GREATEST()

<http://www.postgresql.org/docs/8.2/interactive/functions-conditional.ht
ml#AEN13140>

-----Original Message-----
From: pgsql-general-owner(at)postgresql(dot)org
[mailto:pgsql-general-owner(at)postgresql(dot)org] On Behalf Of Emi Lu
Sent: Tuesday, February 13, 2007 12:37 PM
To: pgsql-general(at)postgresql(dot)org
Subject: [GENERAL] Function in psql to Compare two numbers and return
the bigger value

HEllo,

I am looking for a psql method to get the bigger value of two numbers.

For example,

methodName(12.6, 3.8)

Will return 12.6

Thanks!

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bricklen Anderson 2007-02-13 18:48:26 Re: Function in psql to Compare two numbers and return the bigger value
Previous Message Laura McCord 2007-02-13 18:45:53 Re: Having a problem with my stored procedure