An aggregate function on ARRAY

Поиск
Список
Период
Сортировка
От Rafal Pietrak
Тема An aggregate function on ARRAY
Дата
Msg-id 1281530552.3141.75.camel@localhost.localdomain
обсуждение исходный текст
Ответ на Re: MySQL versus Postgres  (Marco Colombo <pgsql@esiway.net>)
Ответы Re: An aggregate function on ARRAY  (Merlin Moncure <mmoncure@gmail.com>)
Список pgsql-general
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



В списке pgsql-general по дате отправления:

Предыдущее
От: Marco Colombo
Дата:
Сообщение: Re: MySQL versus Postgres
Следующее
От: Merlin Moncure
Дата:
Сообщение: Re: Is there a way to bypass sql?