Re: Bug #724: Problmes creating aggregate functions in 7.2.1

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Bug #724: Problmes creating aggregate functions in 7.2.1
Дата
Msg-id 17672.1028055715@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Bug #724: Problmes creating aggregate functions in 7.2.1  (pgsql-bugs@postgresql.org)
Список pgsql-bugs
pgsql-bugs@postgresql.org writes:
> create aggregate aggint4sum (basetype = int4, sfunc = int4_sum, stype = int4);

This doesn't work because there's no int4_sum(int4, int4).

regression=# \df int4_sum
                 List of functions
 Result data type |   Name   | Argument data types
------------------+----------+---------------------
 bigint           | int4_sum | bigint, integer
                               ^^^^^^
(1 row)

You don't get any automatic conversion when defining an aggregate: the
datatypes have to match exactly.

Your other three examples work for me.

            regards, tom lane

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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: pg_ctl -w option does not behave as documented
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Patch for Re: [HACKERS] Bug of PL/pgSQL parser