How do I get min and max from an array of floating point values

From: pw <p(dot)willis(at)telus(dot)net>
To: pgsql-sql(at)postgresql(dot)org
Subject: How do I get min and max from an array of floating point values
Date: 2008-09-02 21:14:47
Message-ID: 48BDACC7.3070302@telus.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hello,

Is it possible to get the min and max from an array of
floating point values?

The following doesn't return the min of the array values
it simply returns the complete array...(??)

SELECT min(string_to_array('1,2,3,4,5,6,7',',')::float[]);

Thanks

Peter

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Claus Guttesen 2008-09-02 22:27:38 seemingly slow for-loop in plpgsql
Previous Message Richard Broersma 2008-09-02 14:24:05 Re: order of rows in update