Re: Multi-parameter aggregates.

From: "Florian G(dot) Pflug" <fgp(at)phlo(dot)org>
To: Joe Conway <mail(at)joeconway(dot)com>
Cc: Berend Tober <btober(at)seaworthysys(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Multi-parameter aggregates.
Date: 2005-11-21 19:50:24
Message-ID: 43822500.6090205@phlo.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Joe Conway wrote:
> Berend Tober wrote:
>
>> I'm stuck on not knowing how to define a aggregate that takes more
>> that one variable as its argument
But I guess it _could_ take an array as argument, maybe even
a record (postgresql pseudonym for what's called a structure in C).

You'd use it with the following syntax (array):
select covariance(array[x, y]) from t ;

or, for a "record"-parameter (I didn't test it - I just
guess that it should work...)
select covariance((x, y)) from t ;

greetings, Florian Pflug

In response to

Browse pgsql-general by date

  From Date Subject
Next Message stig erikson 2005-11-21 20:16:13 Re: A Not Join
Previous Message Eric E 2005-11-21 19:22:07 Re: to create a database...