BUG #3852: Could not create complex aggregate

Поиск
Список
Период
Сортировка
От Sokolov Yura
Тема BUG #3852: Could not create complex aggregate
Дата
Msg-id 200801060857.m068v38H045938@wwwmaster.postgresql.org
обсуждение исходный текст
Ответы Re: BUG #3852: Could not create complex aggregate  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
The following bug has been logged online:

Bug reference:      3852
Logged by:          Sokolov Yura
Email address:      funny.falcon@gmail.com
PostgreSQL version: 8.3beta4
Operating system:   Linux Debian 4.0rel2
Description:        Could not create complex aggregate
Details:

Possibly it's not an error, then how can I make such aggregate?

create or replace function add_group(grp anyarray, ad anyelement, size int4)
returns anyarray
language plpgsql
as $$
begin
  if array_upper(grp, 1) < size then
    return grp||ad;
  end if;
  return grp;
end;
$$ immutable;

create aggregate build_group(anyelement, int4) (
  SFUNC= add_group,
  STYPE = anyarray
);

> ERROR:  argument declared "anyarray" is not an array but type anyarray
> SQL State:42804

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: pg_dump produces invalid SQL for "group by cast(null as numeric)"
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #3852: Could not create complex aggregate