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: Move BuildDescForRelation() from tupdesc.c to tablecmds.c
Date: Thu, 05 Oct 2023 14:35:20 +0000
Message-ID: <E1qoPRf-000BDE-6z@gemulon.postgresql.org> (raw)

Move BuildDescForRelation() from tupdesc.c to tablecmds.c

BuildDescForRelation() main job is to convert ColumnDef lists to
pg_attribute/tuple descriptor arrays, which is really mostly an
internal subroutine of DefineRelation() and some related functions,
which is more the remit of tablecmds.c and doesn't have much to do
with the basic tuple descriptor interfaces in tupdesc.c.  This is also
supported by observing the header includes we can remove in tupdesc.c.
By moving it over, we can also (in the future) make
BuildDescForRelation() use more internals of tablecmds.c that are not
sensible to be exposed in tupdesc.c.

Discussion: https://www.postgresql.org/message-id/flat/52a125e4-ff9a-95f5-9f61-b87cf447e4da@eisentraut.org

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/04e485273b56bec0e4637f97c587eca26cf823f0

Modified Files
--------------
src/backend/access/common/tupdesc.c | 109 +-----------------------------------
src/backend/commands/tablecmds.c    | 102 +++++++++++++++++++++++++++++++++
src/include/access/tupdesc.h        |   2 -
src/include/commands/tablecmds.h    |   2 +
4 files changed, 105 insertions(+), 110 deletions(-)



Message-ID: <E1qoPRf-000BDE-6z@gemulon.postgresql.org>
Permalink:  ../E1qoPRf-000BDE-6z@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1qoPRf-000BDE-6z@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: Move BuildDescForRelation() from tupdesc.c to tablecmds.c
  In-Reply-To: <E1qoPRf-000BDE-6z@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