array_agg problem

Поиск
Список
Период
Сортировка
От TJ O'Donnell
Тема array_agg problem
Дата
Msg-id CADqA_h-VU7v70vMKNQUxQ6-c+ZJhvuMgkDtNzAGTvWwjTMcqAQ@mail.gmail.com
обсуждение исходный текст
Ответы Re: array_agg problem  (Merlin Moncure <mmoncure@gmail.com>)
Re: array_agg problem  (pasman pasmański <pasman.p@gmail.com>)
Список pgsql-general
array_agg says it can take any type of arg, but this seems not to work
when the arg in an integer array.

create temp table x(name text, val integer[]);
insert into x values('a',array[1,2,3]);
insert into x values('b',array[3,4,5]);
select * from x;
select max(val), min(val) from x;
select array_agg(val) from x;

Well, everything works except the last statement.  In 8.4 I get
ERROR:  could not find array type for data type integer[]

I was hoping for [1,2,3,4,5] or at least [1,2,3,3,4,5] or even [[1,2,3],[3,4,5]]
Am I not understanding something?

Thanks,
TJ O'Donnell

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

Предыдущее
От: Dimitri Fontaine
Дата:
Сообщение: Re: Dump a database excluding one table DATA?
Следующее
От: Merlin Moncure
Дата:
Сообщение: Re: array_agg problem