diff options
author | Amit Langote | 2025-02-17 07:12:03 +0000 |
---|---|---|
committer | Amit Langote | 2025-02-17 07:12:03 +0000 |
commit | 75dfde13639a57513e23e58c961a69c5bbf017b6 (patch) | |
tree | a026576f9ca96cce1f6b79005e219cfdddbc6f7b /src/include | |
parent | 6a8a7ce476bd5f042999a04a0d767b38ea6faec0 (diff) |
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
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/nodes/execnodes.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/include/nodes/execnodes.h b/src/include/nodes/execnodes.h index e2d1dc1e067..2625d7e8222 100644 --- a/src/include/nodes/execnodes.h +++ b/src/include/nodes/execnodes.h @@ -1448,10 +1448,13 @@ typedef struct ModifyTableState double mt_merge_deleted; /* - * List of valid updateColnosLists. Contains only those belonging to - * unpruned relations from ModifyTable.updateColnosLists. + * Lists of valid updateColnosLists, mergeActionLists, and + * mergeJoinConditions. These contain only entries for unpruned + * relations, filtered from the corresponding lists in ModifyTable. */ List *mt_updateColnosLists; + List *mt_mergeActionLists; + List *mt_mergeJoinConditions; } ModifyTableState; /* ---------------- |