Re: Obsolete comments in ResultRelInfo struct

From: Kirill Reshke <reshkekirill(at)gmail(dot)com>
To: Etsuro Fujita <etsuro(dot)fujita(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Obsolete comments in ResultRelInfo struct
Date: 2025-08-11 11:53:44
Message-ID: CALdSSPgMwsgg7FO=HjKQhEfirA7UHTKvkbE=pjx3dXKmLxYgTg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, 11 Aug 2025 at 16:25, Etsuro Fujita <etsuro(dot)fujita(at)gmail(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Chao Li 2025-08-11 12:32:42 Patch 1 of GB18030-2022 support
Previous Message Nazir Bilal Yavuz 2025-08-11 11:40:40 Re: meson: add and use stamp files for generated headers