partial aggregation with internal state type

From: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: partial aggregation with internal state type
Date: 2017-06-09 15:24:52
Message-ID: CAMkU=1w7uFHeZAtsMenYTLKntSvzb4Ou-JEZKRP=1M22MiRCDg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2017-06-09 15:25:49 Re: Something is rotten in publication drop
Previous Message Tom Lane 2017-06-09 15:12:06 Re: strcmp() tie-breaker for identical ICU-collated strings