public inbox for [email protected]
help / color / mirror / Atom feedFrom: Michael Paquier <[email protected]>
To: Jingtang Zhang <[email protected]>
Cc: [email protected]
Subject: Re: Suspicious redundant assignment in COPY FROM
Date: Fri, 8 Sep 2023 14:41:54 +0900
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAPsk3_CrYeXUVHEiaWAYxY9BKiGvGT3AoXo_+Jm0xP_s_VmXCA@mail.gmail.com>
References: <CAPsk3_CrYeXUVHEiaWAYxY9BKiGvGT3AoXo_+Jm0xP_s_VmXCA@mail.gmail.com>
On Fri, Sep 08, 2023 at 12:23:17PM +0800, Jingtang Zhang wrote:
> Hi all, I was reading code of COPY FROM and I found some suspicious
> redundant assignment for tuple descriptor and number of attributes. Is
> it a behavior on purpose, or an accidently involved by the refactor in
> c532d15? Patch is attached.
This looks like a copy-pasto to me, as the tuple descriptor coming
from the relation is just used for sanity checks on the attributes
depending on the options by the caller for the COPY.
The assignment of num_phys_attrs could be kept at the same place as
on HEAD, a bit closer to the palloc0() where it is used.
--
Michael
Attachments:
[application/pgp-signature] signature.asc (833B, ../[email protected]/2-signature.asc)
download
view thread (4+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: Suspicious redundant assignment in COPY FROM
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox