Re: user defined aggregate with multiple arguments

Поиск
Список
Период
Сортировка
От Sergey E. Koposov
Тема Re: user defined aggregate with multiple arguments
Дата
Msg-id Pine.LNX.4.64.0610121350530.14643@lnfm1.sai.msu.ru
обсуждение исходный текст
Ответ на Re: user defined aggregate with multiple arguments  (Bill Eaton <wpeaton@adelphia.net>)
Ответы Re: user defined aggregate with multiple arguments  (Bill Eaton <wpeaton@adelphia.net>)
Список pgsql-general
On Wed, 11 Oct 2006, Bill Eaton wrote:

>
> I just notice that multiple inputs to aggregates are allowed in the upcoming
> 8.2 release. This gives me a great incentive to play with the beta and
> upgrade from 8.0.
>
> One question remains: how about multiple outputs? Can I have a ROW as a
> return value -- i.e. something like SLOPE and INTERCEPT in the original
> example?
>

First, you don't have to write these functions by yourself. The functions
for least squares fit are defined in the standart, and they will be also
in 8.2.
http://momjian.us/main/writings/pgsql/sgml/functions-aggregate.html

But, in any way, if you want your aggregate to return several values, you
can always return them as the elements in the array.

Regards,
     Sergey

*******************************************************************
Sergey E. Koposov
Max Planck Institute for Astronomy/Sternberg Astronomical Institute
Tel: +49-6221-528-349
Web: http://lnfm1.sai.msu.ru/~math
E-mail: math@sai.msu.ru

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

Предыдущее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: STABLE functions
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: List of supported 64bit OS