Update obsolete comments in ResultRelInfo struct.
authorEtsuro Fujita <efujita@postgresql.org>
Sun, 17 Aug 2025 10:40:04 +0000 (19:40 +0900)
committerEtsuro Fujita <efujita@postgresql.org>
Sun, 17 Aug 2025 10:40:04 +0000 (19:40 +0900)
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 <etsuro.fujita@gmail.com>
Reviewed-by: Dean Rasheed <dean.a.rasheed@gmail.com>
Discussion: https://postgr.es/m/CAPmGK14NF5CcdCmTZpxrvpvBiT0y4EqKikW1r_wAu1CEHeOmUA%40mail.gmail.com
Backpatch-through: 14

src/include/nodes/execnodes.h

index d4bffceb2962a0a2f33cf896dcc213e7289932a7..801d7630e9d16a855f4d64b640ba6dd25f7a6a2c 100644 (file)
@@ -501,16 +501,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;