From 242e5afdae49fa1888acc0cea28ea736a2f8ac49 Mon Sep 17 00:00:00 2001 From: Etsuro Fujita Date: Sun, 17 Aug 2025 19:40:03 +0900 Subject: [PATCH] Update obsolete comments in ResultRelInfo struct. Commit c5b7ba4e6 changed things so that the ri_RootResultRelInfo field of this struct is set for both partitions and inheritance children and used for tuple routing and transition capture (before that commit, it was only set for partitions to route tuples into), but failed to update these comments. Author: Etsuro Fujita Reviewed-by: Dean Rasheed Discussion: https://postgr.es/m/CAPmGK14NF5CcdCmTZpxrvpvBiT0y4EqKikW1r_wAu1CEHeOmUA%40mail.gmail.com Backpatch-through: 14 --- src/include/nodes/execnodes.h | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/include/nodes/execnodes.h b/src/include/nodes/execnodes.h index 9741435b96a..8d831d0df6e 100644 --- a/src/include/nodes/execnodes.h +++ b/src/include/nodes/execnodes.h @@ -528,16 +528,14 @@ typedef struct ResultRelInfo ExprState *ri_PartitionCheckExpr; /* - * Information needed by tuple routing target relations + * Information needed by child result relations * - * RootResultRelInfo gives the target relation mentioned in the query, if - * it's a partitioned table. It is not set if the target relation - * mentioned in the query is an inherited table, nor when tuple routing is - * not needed. + * ri_RootResultRelInfo gives the target relation mentioned in the query. + * Used as the root for tuple routing and/or transition capture. * - * RootToPartitionMap and PartitionTupleSlot, initialized by - * ExecInitRoutingInfo, are non-NULL if partition has a different tuple - * format than the root table. + * ri_RootToPartitionMap and ri_PartitionTupleSlot, initialized by + * ExecInitRoutingInfo, are non-NULL if the relation is a partition to + * route tuples into and has a different tuple format than the root table. */ struct ResultRelInfo *ri_RootResultRelInfo; TupleConversionMap *ri_RootToPartitionMap;