[HACKERS] partial aggregation with internal state type - Mailing list pgsql-hackers

From Jeff Janes
Subject [HACKERS] partial aggregation with internal state type
Date
Msg-id CAMkU=1w7uFHeZAtsMenYTLKntSvzb4Ou-JEZKRP=1M22MiRCDg@mail.gmail.com
Whole thread Raw
Responses Re: [HACKERS] partial aggregation with internal state type  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers

The docs for creating aggregates for 9.6 and beyond say:

"For aggregate functions whose state_data_type is internal, the combinefunc must not be strict. In this case the combinefunc must ensure that null states are handled correctly and that the state being returned is properly stored in the aggregate memory context."

Since combinefunc with an internal type is only useful when serialfunc and deserialfunc are also defined, why can't the built-in machinery just do the right thing when faced with a strict combinefunc?

Cheers,

Jeff

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] strcmp() tie-breaker for identical ICU-collated strings
Next
From: Peter Eisentraut
Date:
Subject: Re: [HACKERS] Something is rotten in publication drop