Re: Combining Aggregates - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Combining Aggregates
Date
Msg-id 54ECCF00.9080906@gmx.net
Whole thread Raw
In response to Re: Combining Aggregates  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Responses Re: Combining Aggregates
List pgsql-hackers
On 2/20/15 3:09 PM, Tomas Vondra wrote:
> The 'combine' function gets two such 'state' values, while transition
> gets 'state' + next value.

I think the combine function is not actually a property of the
aggregate, but a property of the transition function.  If two aggregates
have the same transition function, they will also have the same combine
function.  The combine function really just says, how do you combine two
series of these function calls.  Say maybe this should be put into
pg_proc instead.  (Or you make the transition functions transition
operators and put the info into pg_operator instead, which is where
function call optimization information is usually kept.)




pgsql-hackers by date:

Previous
From: Josh Berkus
Date:
Subject: Re: mogrify and indent features for jsonb
Next
From: Peter Eisentraut
Date:
Subject: Re: Enforce creation of destination folders for source files in pg_regress (Was: pg_regress writes into source tree)