Fix executor prune failure when plan already pruned
In a multi-layer partitioning setup, if at plan time all the
sub-partitions are pruned but the intermediate one remains, the executor
later throws a spurious error that there's nothing to prune. That is
correct, but there's no reason to throw an error. Therefore, don't.
Reported-by: Andreas Seltenreich <[email protected]>
Author: David Rowley <[email protected]>
Discussion: https://postgr.es/m/[email protected]
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/1eb9221585c25cad1a563bc3414f697dae3fbc8b
Modified Files
--------------
src/backend/executor/execPartition.c | 9 +++++++--
src/test/regress/expected/partition_prune.out | 18 ++++++++++++++++++
src/test/regress/sql/partition_prune.sql | 12 ++++++++++++
3 files changed, 37 insertions(+), 2 deletions(-)