Search Postgresql Archives

An aggregate function on ARRAY

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I've started using ARRAY data type recently, and I fell into the
following problem:

When I have a relatively large ARRAY (like [1:500]) takeing an aggregate
function on its elements is not so easy. One has to iterate all the
elements, like this: 

SELECT min(A[1]) as a1, min(A[2]) as a2, ...

This is because aggregate functions are not defined on ARRAY types. Or
may be there is an easier and more readable way to do that?

-R



-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux