how to get the max value in an array

From: fanngyuan <fanngyuan(at)gmail(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: how to get the max value in an array
Date: 2011-06-03 02:52:47
Message-ID: 4DE84C7F.9010600@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

hi guys:
I'm using int[] in postgrsql to store int array. I want to get max
value of each row . While I can't find any function to get it(max
function will get max array in one column) . Even I could write a sql
function to get the max value. I still think a native funtion is better
. Can your guys help me?
Thanks

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim Nasby 2011-06-03 03:58:33 Re: storing TZ along timestamps
Previous Message Tom Lane 2011-06-03 02:21:13 Re: vacuum and row type