how do you write aggregate function

Поиск
Список
Период
Сортировка
От Justin
Тема how do you write aggregate function
Дата
Msg-id 47CD7C72.2010604@emproshunts.com
обсуждение исходный текст
Ответы Re: how do you write aggregate function
Re: how do you write aggregate function
Список pgsql-general
The help is not real clear nor can i find examples how to write an aggregate function. 

I searched the archive of the mail list and did not find anything

I need to write Weighted Average function so the need to keep track of multiple variables between function calls is must?

 I see how the sfunc( internal-state, next-data-values )   keeps track of the passed values with the internal state.  Can the internal state be an array type where i  just adding new entries to a multi-dimensional array then on ffunc do all the math in.

One person pointed out the pl/r plugin but what i'm working on gets tied into the PostBooks/OpenMfg project and they are not real big fans on adding another language and plugin they have to make sure their customers have deployed (which i'm one of those customers).

PostBooks/OpenMfg will want all the functions in pl/pgsql  does this present any major problems??

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

Предыдущее
От: "Douglas McNaught"
Дата:
Сообщение: Re: Build 8.3 with OpenSSL on CentOS 5.x?
Следующее
От: Colin Wetherbee
Дата:
Сообщение: Re: how do you write aggregate function