Re: About aggregates...

Поиск
Список
Период
Сортировка
От Ondrej Ivanič
Тема Re: About aggregates...
Дата
Msg-id CAM6mieLhSAzLeu+=e6GH-z5ASXhe7FHezVx3shdf0uvNNcp_pg@mail.gmail.com
обсуждение исходный текст
Ответ на About aggregates...  (Michael Giannakopoulos <miccagiann@gmail.com>)
Список pgsql-general
Hi,

On 30 November 2012 08:06, Michael Giannakopoulos <miccagiann@gmail.com> wrote:
> However an aggregate function
> feeds me one a tuple for each call, but I would like to have access to a
> batch of tuples per function call. Is there any possible way to perform
> something like this?

Yes, this might be good for you::

WINDOW
WINDOW indicates that the function is a window function rather than a
plain function. This is currently only useful for functions written in
C. The WINDOW attribute cannot be changed when replacing an existing
function definition.
http://www.postgresql.org/docs/9.1/static/sql-createfunction.html

Apart from C you can use this in Pl/R:
http://www.joeconway.com/plr/doc/plr-window-funcs.html


--
Ondrej


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

Предыдущее
От: Michael Giannakopoulos
Дата:
Сообщение: About aggregates...
Следующее
От: "David Johnston"
Дата:
Сообщение: Re: About aggregates...