postgresql/src
Tom Lane 47c6772eb7 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
2018-01-03 17:53:41 -05:00
..
backend Clean up tupdesc.c for recent changes. 2018-01-03 17:53:41 -05:00
bin Rename pg_rewind's copy_file_range() to avoid conflict with new linux syscall. 2018-01-03 12:40:32 -08:00
common Update copyright for 2018 2018-01-02 23:30:12 -05:00
fe_utils Update copyright for 2018 2018-01-02 23:30:12 -05:00
include Allow ldaps when using ldap authentication 2018-01-03 10:11:26 -05:00
interfaces Update copyright for 2018 2018-01-02 23:30:12 -05:00
makefiles
pl Update copyright for 2018 2018-01-02 23:30:12 -05:00
port Update copyright for 2018 2018-01-02 23:30:12 -05:00
template
test Revert "Fix isolation test to be less timing-dependent" 2018-01-03 18:22:41 -03:00
timezone Update copyright for 2018 2018-01-02 23:30:12 -05:00
tools Fix use of config-specific libraries for Windows OpenSSL 2018-01-03 15:36:54 -05:00
tutorial Update copyright for 2018 2018-01-02 23:30:12 -05:00
.gitignore
DEVELOPERS
Makefile
Makefile.global.in
Makefile.shlib
nls-global.mk