On Thu, 13 Apr 2006, Tom Lane wrote: > "Sergey E. Koposov" <[EMAIL PROTECTED]> writes: > > ... Nothing else and nothing internal need not to be changed to > > insert new two-arg. aggregate functions into the core. > > Am I right in this ? > > IIRC the main issues are the syntax of CREATE AGGREGATE and the actual > implementation in nodeAgg.c. See previous discussions, eg > http://archives.postgresql.org/pgsql-general/2006-03/msg00512.php
Actually, I think that I'll try to implement that. And I already have spent some time looking at the things which should be changed. And I have the question. Does it make sense to extend the aggregate functions to the only two-argument case? I mean, does it have a chance to be accepted ? Because it seems that it will be much simpler for me to implement the one or two arg. aggregates (not aggregates with ANY number of args) since it does not require variable length arrays and additional burdens with the memory allocations, contexts etc... > > I would really prefer to see CREATE AGGREGATE normalized to have a > syntax comparable to CREATE FUNCTION (or DROP AGGREGATE for that > matter): > CREATE AGGREGATE aggname (typname [, ... ]) ...definition... > but it's not clear how to get there without breaking backwards > compatibility :-( > I don't know what to do with CREATE AGGREGATE syntax. I think that I won't work on that, since at least I want to enable the core (not user created) two-arg. aggregates. I hope that it's acceptable ... Regards, Sergey ******************************************************************* Sergey E. Koposov Max Planck Institute for Astronomy/Sternberg Astronomical Institute Web: http://lnfm1.sai.msu.ru/~math E-mail: [EMAIL PROTECTED] ---------------------------(end of broadcast)--------------------------- TIP 6: explain analyze is your friend