>>>>> "Tom" == Tom Lane <t...@sss.pgh.pa.us> writes:
>>> Honestly, ChainAggregate is _trivial_ compared to trying to make the >>> GroupAggregate code deal with multiple inputs, or trying to make some >>> new sort of plumbing node to feed input to those sorts. (You'd think >>> that it should be possible to use the existing CTE mechanics to do it, >>> but noooo... the existing code is actively and ferociously hostile to >>> the idea of adding new CTEs from within the planner.) >> That's unfortunate. Tom> I'm less than convinced that it's true ... Maybe you can figure out how, but I certainly didn't see a reasonable way. I would also question one aspect of the desirability - using the CTE mechanism has the downside of needing an extra tuplestore with the full input data set in it, whereas the chain mechanism only has aggregated data in its tuplestore which should be much smaller. -- Andrew (irc:RhodiumToad) -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers