From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Clean up tupdesc.c for recent changes. |
Date: | 2018-01-03 22:53:53 |
Message-ID: | E1eWruz-0000Gb-J8@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
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(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2018-01-04 01:17:04 | Re: pgsql: Add parallel-aware hash joins. |
Previous Message | Alvaro Herrera | 2018-01-03 22:12:50 | pgsql: Fix typo |