Fix an oversight in cbc127917 to handle MERGE correctly
Amit Langote <amitlan@postgresql.org>
Fix an oversight in cbc127917 to handle MERGE correctly ExecInitModifyTable() forgot to trim MERGE-related lists to exclude entries for result relations pruned during initial pruning, so fix that. While at it, make the function's use of the pruned resultRelations list, rather than ModifyTable.resultRelations, more consistent. Reported-by: Alexander Lakhin <exclusion@gmail.com> (via sqlsmith) Reviewed-by: Junwang Zhao <zhjwpku@gmail.com> Discussion: https://postgr.es/m/e72c94d9-e5f9-4753-9bc1-69d72bd54b8a@gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/executor/nodeModifyTable.c | modified | +27 −8 |
| src/include/nodes/execnodes.h | modified | +5 −2 |
| src/test/regress/expected/partition_prune.out | modified | +77 −0 |
| src/test/regress/sql/partition_prune.sql | modified | +25 −0 |
Discussion
- generic plans and "initial" pruning 249 messages · 2021-12-25 → 2026-07-06