Re: Obsolete comments in ResultRelInfo struct - Mailing list pgsql-hackers

From Kirill Reshke
Subject Re: Obsolete comments in ResultRelInfo struct
Date
Msg-id CALdSSPgMwsgg7FO=HjKQhEfirA7UHTKvkbE=pjx3dXKmLxYgTg@mail.gmail.com
Whole thread Raw
In response to Obsolete comments in ResultRelInfo struct  (Etsuro Fujita <etsuro.fujita@gmail.com>)
Responses Re: Obsolete comments in ResultRelInfo struct
List pgsql-hackers
On Mon, 11 Aug 2025 at 16:25, Etsuro Fujita <etsuro.fujita@gmail.com> wrote:
>
> Hi,
>
> While working on commit 62a1211d3, I noticed $SUBJECT:
>
>     /*
>      * Information needed by tuple routing target 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.
>      *
>      * PartitionTupleSlot is non-NULL if RootToChild conversion is needed and
>      * the relation is a partition.
>      */
>     struct ResultRelInfo *ri_RootResultRelInfo;
>     TupleTableSlot *ri_PartitionTupleSlot;
>
> I think the comment about ri_RootResultRelInfo is correct for pre-14
> versions, but not for later versions because it is set also when the
> target relation is an inherited table (see ExecInitModifyTable()), in
> which case it is used for transition capture, not for tuple routing.
> So I would like to propose to update that comment like this:
>
>     /*
>      * Other information needed by child result relations
>      *
>      * 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 the relation is a partition to route
>      * tuples into and RootToChild conversion is needed.
>      */
>
> I slightly modified the top and bottom comments as well.  (In the top
> comment, I added "Other" because we have the definitions of members
> such as ri_ChildToRootMap and ri_RootToChildMap above.)
>
> Comments welcome!
>
> Best regards,
> Etsuro Fujita
>
>

Hi! Looks like you forgot to actually attach a patch file?

-- 
Best regards,
Kirill Reshke



pgsql-hackers by date:

Previous
From: Nazir Bilal Yavuz
Date:
Subject: Re: meson: add and use stamp files for generated headers
Next
From: Chao Li
Date:
Subject: Patch 1 of GB18030-2022 support