Avoid generating bogus paths with partitionwise aggregate.
Previously, if some or all partitions had no partially aggregated path,
we would still try to generate a partially aggregated path for the
parent, leading to assertion failures or wrong answers.
Report by Rajkumar Raghuwanshi. Patch by Jeevan Chalke, reviewed
by Ashutosh Bapat. A few changes by me.
Discussion: http://postgr.es/m/CAKcux6=q4+Mw8gOOX16ef6ZMFp9Cve7KWFstUsrDa4GiFaXGUQ@mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/c6f28af5d7af87d7370e5f169251d91437f100a2
Modified Files
--------------
src/backend/optimizer/plan/planner.c | 21 +++--
src/test/regress/expected/partition_aggregate.out | 105 ++++++++++++++++++++++
src/test/regress/sql/partition_aggregate.sql | 24 +++++
3 files changed, 142 insertions(+), 8 deletions(-)