]> granicus.if.org Git - postgresql/commit
Fix partial aggregation for the case of a degenerate GROUP BY clause.
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 10 Nov 2016 16:31:56 +0000 (11:31 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 10 Nov 2016 16:31:56 +0000 (11:31 -0500)
commit7defc3b97a31537547053946808a83e7234d1b61
tree67007796858e47b04d104d2fb0e3a773e68e26dc
parentc32e05bce74cbb965f8f847d65caa20947b4d2bb
Fix partial aggregation for the case of a degenerate GROUP BY clause.

The plan generated for sorted partial aggregation with "GROUP BY constant"
included a Sort node with no sort keys, which the executor does not like.

Per report from Steve Randall.  I'd add a regression test case if I could
think of a compact one, but it doesn't seem worth expending lots of cycles
on.

Report: <CABVd52UAdGXpg_rCk46egpNKYdXOzCjuJ1zG26E2xBe_8bj+Fg@mail.gmail.com>
src/backend/optimizer/plan/planner.c