postgresql/src/backend
Andrew Gierth bf6cc19e34 Force tuple conversion when the source has missing attributes.
Tuple conversion incorrectly concluded that no conversion was needed
as long as all the attributes lined up. But if the source tuple has a
missing attribute (from addition of a column with default), then the
destination tupdesc might not reflect the same default. The typical
symptom was that the affected columns would be unexpectedly NULL.

Repair by always forcing conversion if the source has missing
attributes, which will be filled in by the deform operation. (In
theory we could optimize for when the destination has the same
default, but that seemed overkill.)

Backpatch to 11 where missing attributes were added.

Per bug #16242.

Vik Fearing (discovery, code, testing) and me (analysis, testcase).

Discussion: https://postgr.es/m/16242-d1c9fca28445966b@postgresql.org
2020-02-05 20:21:20 +00:00
..
access Force tuple conversion when the source has missing attributes. 2020-02-05 20:21:20 +00:00
bootstrap Update copyrights for 2020 2020-01-01 12:21:45 -05:00
catalog Fix CheckAttributeType's handling of collations for ranges. 2020-01-31 17:03:55 -05:00
commands Fix handling of "Subplans Removed" field in EXPLAIN output. 2020-02-04 13:07:13 -05:00
executor Add missing break out seqscan loop in logical replication 2020-02-03 18:59:12 -03:00
foreign Update copyrights for 2020 2020-01-01 12:21:45 -05:00
jit Update copyrights for 2020 2020-01-01 12:21:45 -05:00
lib Update copyrights for 2020 2020-01-01 12:21:45 -05:00
libpq Sprinkle some const decorations 2020-01-31 12:52:08 +01:00
main Update copyrights for 2020 2020-01-01 12:21:45 -05:00
nodes Reconsider the representation of join alias Vars. 2020-01-09 11:56:59 -05:00
optimizer Clean up newlines following left parentheses 2020-01-30 13:42:14 -03:00
parser Invent "trusted" extensions, and remove the pg_pltemplate catalog. 2020-01-29 18:42:43 -05:00
partitioning Update copyrights for 2020 2020-01-01 12:21:45 -05:00
po
port Update copyrights for 2020 2020-01-01 12:21:45 -05:00
postmaster Clean up newlines following left parentheses 2020-01-30 13:42:14 -03:00
regex Update copyrights for 2020 2020-01-01 12:21:45 -05:00
replication Clean up newlines following left parentheses 2020-01-30 13:42:14 -03:00
rewrite Make rewriter prevent auto-updates on views with conditional INSTEAD rules. 2020-01-14 09:52:21 +00:00
snowball Update copyrights for 2020 2020-01-01 12:21:45 -05:00
statistics Report progress of ANALYZE commands 2020-01-15 11:14:39 -03:00
storage Add kqueue(2) support to the WaitEventSet API. 2020-02-05 17:35:57 +13:00
tcop Clean up newlines following left parentheses 2020-01-30 13:42:14 -03:00
tsearch Clean up newlines following left parentheses 2020-01-30 13:42:14 -03:00
utils Make vacuum buffer counters 64 bits wide 2020-02-05 16:59:29 -03:00
.gitignore
common.mk
Makefile Update copyrights for 2020 2020-01-01 12:21:45 -05:00
nls.mk