Re: two-argument aggregates and SQL 2003

Поиск
Список
Период
Сортировка
От Sergey E. Koposov
Тема Re: two-argument aggregates and SQL 2003
Дата
Msg-id Pine.LNX.4.44.0604142031220.20730-100000@lnfm1.sai.msu.ru
обсуждение исходный текст
Ответ на Re: two-argument aggregates and SQL 2003  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: two-argument aggregates and SQL 2003  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Thu, 13 Apr 2006, Tom Lane wrote:

> "Sergey E. Koposov" <math@sai.msu.ru> 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: math@sai.msu.ru




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

Предыдущее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: Practical impediment to supporting multiple SSL libraries
Следующее
От: Juan Manuel Diaz Lara
Дата:
Сообщение: Problem compiling from cvs, mingw