Re: AGREGATE FUNCTIONS

Поиск
Список
Период
Сортировка
От Mark Woodward
Тема Re: AGREGATE FUNCTIONS
Дата
Msg-id 18858.24.91.171.78.1149649748.squirrel@mail.mohawksoft.com
обсуждение исходный текст
Ответ на AGREGATE FUNCTIONS  (Roberto Rezende de Assis <rezende_assis@yahoo.com.br>)
Список pgsql-hackers
> Hello, I would like to know where in the source-code of postgres is
> located the code of the aggregate functions min, max, avg.
> I wish to develop more statistical aggregate functions, and I prefer to
> use C than to write then in the PL/R.

There is a library in "contrib" called "intagg." I wrote it a few years
ago, and I have to laugh at the README file because I must have been
stoned or something, because I can't understand it.

Anyways, if you want to make an aggregate function, it covers what you
need. Feel free to ignore the array stuff, because you probably won't need
to deal with it.

Aggregates have basically two functions, a single function called on every
iteration of the "query" (or GROUP BY) for "state." Then there is a
function that is called at the end called "final." The PostgreSQL docs are
pretty good as well.



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: That EXPLAIN ANALYZE patch still needs work
Следующее
От: "Mark Woodward"
Дата:
Сообщение: Re: How to avoid transaction ID wrap