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.)