Re: Multi-parameter aggregates. - Mailing list pgsql-general

From Tom Lane
Subject Re: Multi-parameter aggregates.
Date
Msg-id 2584.1132592800@sss.pgh.pa.us
Whole thread Raw
In response to Multi-parameter aggregates.  (Berend Tober <btober@seaworthysys.com>)
List pgsql-general
Berend Tober <btober@seaworthysys.com> writes:
> I'm stuck on not knowing how to define a
> aggregate that takes more that one variable as its argument,

That's because there isn't any way to do that.  It's on the TODO list
I believe.  In the meantime, you could possibly kluge it up by
defining a composite type to be the aggregate's argument, and calling
it like
    SELECT covariance(row(...)) FROM ...

            regards, tom lane

pgsql-general by date:

Previous
From: Michael Fuhr
Date:
Subject: Re: Multi-parameter aggregates.
Next
From: Chris Kratz
Date:
Subject: Rule appears not to fire on insert w/ "except"