postgresql/src/tools
Michael Paquier e1551f96e6 Refactor attribute mappings used in logical tuple conversion
Tuple conversion support in tupconvert.c is able to convert rowtypes
between two relations, inner and outer, which are logically equivalent
but have a different ordering or even dropped columns (used mainly for
inheritance tree and partitions).  This makes use of attribute mappings,
which are simple arrays made of AttrNumber elements with a length
matching the number of attributes of the outer relation.  The length of
the attribute mapping has been treated as completely independent of the
mapping itself until now, making it easy to pass down an incorrect
mapping length.

This commit refactors the code related to attribute mappings and moves
it into an independent facility called attmap.c, extracted from
tupconvert.c.  This merges the attribute mapping with its length,
avoiding to try to guess what is the length of a mapping to use as this
is computed once, when the map is built.

This will avoid mistakes like what has been fixed in dc816e58, which has
used an incorrect mapping length by matching it with the number of
attributes of an inner relation (a child partition) instead of an outer
relation (a partitioned table).

Author: Michael Paquier
Reviewed-by: Amit Langote
Discussion: https://postgr.es/m/20191121042556.GD153437@paquier.xyz
2019-12-18 16:23:02 +09:00
..
editors Make Emacs perl-mode indent more like perltidy. 2019-01-13 11:32:31 -08:00
findoidjoins Split all OBJS style lines in makefiles into one-line-per-entry style. 2019-11-05 14:41:07 -08:00
ifaddrs Split all OBJS style lines in makefiles into one-line-per-entry style. 2019-11-05 14:41:07 -08:00
make_diff Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
msvc Sort out getpeereid() and peer auth handling on Windows 2019-12-16 09:36:08 +01:00
perlcheck Fix whitespace 2018-06-27 08:03:54 +02:00
pginclude For all ppc compilers, implement compare_exchange and fetch_add with asm. 2019-10-18 20:20:52 -07:00
pgindent Refactor attribute mappings used in logical tuple conversion 2019-12-18 16:23:02 +09:00
ccsym tools/ccsym: update for modern versions of gcc 2015-01-20 13:02:58 -05:00
check_bison_recursion.pl Update copyright for 2019 2019-01-02 12:44:25 -05:00
codelines Fix remaining stray references to CVS. 2010-09-22 19:51:39 -04:00
copyright.pl Update copyright for 2019 2019-01-02 12:44:25 -05:00
find_badmacros Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
find_static Fix omission of -X (--no-psqlrc) in some psql invocations. 2015-12-28 11:46:43 -05:00
find_typedef Refer to OS X as "macOS", except for the port name which is still "darwin". 2016-09-25 15:40:57 -04:00
fix-old-flex-code.pl Replace @postgresql.org with @lists.postgresql.org for mailinglists 2019-01-19 19:06:35 +01:00
gen_keywordlist.pl Initial pgperltidy run for v12. 2019-05-22 13:36:19 -04:00
git-external-diff Preserve information on use of git-external-diff 2018-05-24 23:45:31 +09:30
git_changelog Fix incorrect use of term HEAD for Git 2019-10-07 09:44:17 +02:00
make_ctags Improve missing-program error handling in make_ctags and make_etags. 2019-01-13 13:33:50 -05:00
make_etags Improve missing-program error handling in make_ctags and make_etags. 2019-01-13 13:33:50 -05:00
make_mkid Add another pgdefine path check, and a cvs-git change. 2011-08-26 21:52:35 -04:00
PerfectHash.pm Make our perfect hash functions be valid C++. 2019-05-31 10:40:00 -04:00
pgtest pgtest: run clean, build, and check stages separately 2018-07-28 15:34:06 -04:00
RELEASE_CHANGES Fix incorrect use of term HEAD for Git 2019-10-07 09:44:17 +02:00
testint128.c Update copyright for 2019 2019-01-02 12:44:25 -05:00
valgrind.supp Revert "Add valgrind suppressions for wcsrtombs optimizations" 2019-01-19 20:49:51 +01:00
version_stamp.pl Stamp HEAD as 13devel. 2019-07-01 12:50:55 -04:00
win32tzlist.pl Update copyright for 2019 2019-01-02 12:44:25 -05:00