Update obsolete comments in ResultRelInfo struct.
authorEtsuro Fujita <efujita@postgresql.org>
Sun, 17 Aug 2025 10:40:02 +0000 (19:40 +0900)
committerEtsuro Fujita <efujita@postgresql.org>
Sun, 17 Aug 2025 10:40:02 +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 f40cb9bb5ba836bcc692f5bf7d4566c000a88925..74718fa256dca8628471b6ff374fedf4215c5aaa 100644 (file)
@@ -565,15 +565,13 @@ typedef struct ResultRelInfo
    bool        ri_RootToChildMapValid;
 
    /*
-    * Information needed by tuple routing target relations
+    * Other 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.
     *
-    * PartitionTupleSlot is non-NULL if RootToChild conversion is needed and
-    * the relation is a partition.
+    * ri_PartitionTupleSlot is non-NULL if the relation is a partition to
+    * route tuples into and ri_RootToChildMap conversion is needed.
     */
    struct ResultRelInfo *ri_RootResultRelInfo;
    TupleTableSlot *ri_PartitionTupleSlot;