public inbox for [email protected]  
help / color / mirror / Atom feed
From: Álvaro Herrera <[email protected]>
To: [email protected]
Subject: pgsql: Change one loop in ATRewriteTable to use 1-based attnums
Date: Fri, 21 Mar 2025 10:01:07 +0000
Message-ID: <[email protected]> (raw)

Change one loop in ATRewriteTable to use 1-based attnums

All TupleDescAttr() calls in tablecmds.c that aren't in loops across all
attributes use AttrNumber-style indexes (1-based); there was only one
place in ATRewriteTable that was stashing 0-based indexes in a list for
later processing.  Switch that to use attnums for consistency.

Author: jian he <[email protected]>
Discussion: https://postgr.es/m/CACJufxEoYA5ScUr2=CmA1xcpaS_1ixneDbEkVU77X1ctGxY2mA@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/1d617a20284f887cb9cdfe5693eec155e8016517

Modified Files
--------------
src/backend/commands/tablecmds.c | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)



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]
  Subject: Re: pgsql: Change one loop in ATRewriteTable to use 1-based attnums
  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