pgsql: Fix partial aggregation for the case of a degenerate GROUP BY cl

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix partial aggregation for the case of a degenerate GROUP BY cl
Date: 2016-11-10 16:32:03
Message-ID: E1c4sGh-000773-2o@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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(at)mail(dot)gmail(dot)com>

Branch
------
REL9_6_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/7defc3b97a31537547053946808a83e7234d1b61

Modified Files
--------------
src/backend/optimizer/plan/planner.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2016-11-10 19:13:49 pgsql: Support "COPY view FROM" for views with INSTEAD OF INSERT trigge
Previous Message Tom Lane 2016-11-10 15:37:17 pgsql: Doc: improve link.