pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@postgresql.org
Subject: pgsql: Clean up tupdesc.c for recent changes.
Date: Wed, 03 Jan 2018 22:53:53 +0000
Message-ID: <E1eWruz-0000Gb-J8@gemulon.postgresql.org> (raw)

Clean up tupdesc.c for recent changes.

TupleDescCopy needs to have the same effects as CreateTupleDescCopy in
that, since it doesn't copy constraints, it should clear the per-attribute
fields associated with them.  Oversight in commit cc5f81366.

Since TupleDescCopy has already established the presumption that it
can just flat-copy the entire attribute array in one go, propagate
that approach into CreateTupleDescCopy and CreateTupleDescCopyConstr.
(I'm suspicious that this would lead to valgrind complaints if we
had any trailing padding in the struct, but we do not, and anyway
fixing that seems like a job for a separate commit.)

Add some better comments.

Thomas Munro, reviewed by Vik Fearing, some additional hacking by me

Discussion: https://postgr.es/m/CAEepm=0NvOGZ8B6GbQyQe2C_c2m3LKJ9w=8OMBaYRLgZ_Gw6Nw@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/47c6772eb7222dbfa200db4bbeba8002b96b7976

Modified Files
--------------
src/backend/access/common/tupdesc.c | 52 ++++++++++++++++++++++++++++++++-----
1 file changed, 45 insertions(+), 7 deletions(-)



Message-ID: <E1eWruz-0000Gb-J8@gemulon.postgresql.org>
Permalink:  ../E1eWruz-0000Gb-J8@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1eWruz-0000Gb-J8@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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Clean up tupdesc.c for recent changes.
  In-Reply-To: <E1eWruz-0000Gb-J8@gemulon.postgresql.org>
  References: <E1eWruz-0000Gb-J8@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