pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Split some code out from MergeAttributes()
Date: Fri, 26 Jan 2024 12:52:27 +0000
Message-ID: <E1rTLh5-003CiF-KD@gemulon.postgresql.org> (raw)

Split some code out from MergeAttributes()

- Separate function to merge a child attribute into matching inherited
  attribute: The logic to merge a child attribute into matching
  inherited attribute in MergeAttribute() is only applicable to
  regular inheritance child.  The code is isolated and coherent enough
  that it can be separated into a function of its own.

- Separate function to merge next parent attribute: Partitions inherit
  from only a single parent.  The logic to merge an attribute from the
  next parent into the corresponding attribute inherited from previous
  parents in MergeAttribute() is only applicable to regular
  inheritance children.  This code is isolated enough that it can be
  separate into a function by itself.

These separations makes MergeAttribute() more readable by making it
easier to follow high level logic without getting entangled into
details.

Author: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
Discussion: https://www.postgresql.org/message-id/flat/52a125e4-ff9a-95f5-9f61-b87cf447e4da@eisentraut.org

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/f7cf9494bad3aef1b2ba1cd84376a1e71797ac50

Modified Files
--------------
src/backend/commands/tablecmds.c | 536 +++++++++++++++++++++------------------
1 file changed, 296 insertions(+), 240 deletions(-)



Message-ID: <E1rTLh5-003CiF-KD@gemulon.postgresql.org>
Permalink:  ../E1rTLh5-003CiF-KD@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1rTLh5-003CiF-KD@gemulon.postgresql.org

 · 

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: pgsql-committers@postgresql.org
  Cc: peter@eisentraut.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Split some code out from MergeAttributes()
  In-Reply-To: <E1rTLh5-003CiF-KD@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox