KaiGai, David Rowley and myself have all made mention of various ways
we could optimize aggregates.
Following WIP patch adds an extra function called a "combining
function", that is intended to allow the user to specify a
semantically correct way of breaking down an aggregate into multiple
steps.
Gents, is this what you were thinking? If not...
--
Simon Riggs http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services