Re: minor comments issue in ResultRelInfo src/include/nodes/execnodes.h

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: jian he <jian(dot)universality(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: minor comments issue in ResultRelInfo src/include/nodes/execnodes.h
Date: 2024-08-12 10:32:22
Message-ID: CAApHDvpfSi7kZDLPPXYHP2xfTn9Hgnu2tvawtK2z_Mxhj4hNPg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, 12 Aug 2024 at 22:03, jian he <jian(dot)universality(at)gmail(dot)com> wrote:
> AttrNumber ri_RowIdAttNo;
>
> /* arrays of stored generated columns expr states, for INSERT and UPDATE */
> ExprState **ri_GeneratedExprsI;
> ExprState **ri_GeneratedExprsU;
> }
> for the struct ResultRelInfo, i've checked the above fields.
>
> I think first ri_RowIdAttNo applies to MERGE also. so the comments may
> not be correct?

Yeah, ri_RowIdAttNo is used for MERGE. We should fix that comment.

> Other files comments are fine.

I'd say ri_GeneratedExprsI and ri_GeneratedExprsU are also used for
MERGE and the comment for those is also outdated. See:

ExecMergeMatched -> ExecUpdateAct -> ExecUpdatePrepareSlot ->
ExecComputeStoredGenerated(..., CMD_UPDATE)
ExecMergeNotMatched -> ExecInsert -> ExecComputeStoredGenerated(..., CMD_INSERT)

David

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message jian he 2024-08-12 10:33:13 Re: Remove dependence on integer wrapping
Previous Message Arseny Sher 2024-08-12 10:13:19 Re: Taking into account syncrep position in flush_lsn reported by apply worker