Re: how can I select into an array?

Поиск
Список
Период
Сортировка
От Joe Conway
Тема Re: how can I select into an array?
Дата
Msg-id 4023CB7C.7090809@joeconway.com
обсуждение исходный текст
Ответ на Re: how can I select into an array?  (Pavel Stehule <stehule@kix.fsv.cvut.cz>)
Список pgsql-general
Pavel Stehule wrote:

> CREATE AGGREGATE aggarray (BASETYPE = ANYELEMENT, SFUNC = aggregate_array,
> STYPE = ANYARRAY);

Or, from the docs, see:
http://www.postgresql.org/docs/current/static/xaggr.html

CREATE AGGREGATE array_accum (
      sfunc = array_append,
      basetype = anyelement,
      stype = anyarray,
      initcond = '{}'
);

array_append() is built-in in 7.4 -- and note both Pavel's solution and
this one require 7.4.x

HTH,

Joe



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

Предыдущее
От: Franco Bruno Borghesi
Дата:
Сообщение: Re: newbie question... how do I get table structure?
Следующее
От: Franco Bruno Borghesi
Дата:
Сообщение: Re: retrieving parts of a resultset