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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: graham(at)molbio(dot)uoregon(dot)edu, pgsql-bugs(at)postgresql(dot)org
Subject: Re: Bug #724: Problmes creating aggregate functions in 7.2.1
Date: 2002-07-30 19:01:55
Message-ID: 17672.1028055715@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

pgsql-bugs(at)postgresql(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2002-07-30 19:20:51 Re: Patch for Re: [HACKERS] Bug of PL/pgSQL parser
Previous Message Bruce Momjian 2002-07-30 18:55:43 Re: pg_ctl -w option does not behave as documented