]> granicus.if.org Git - postgresql/commit
Fix missing values when doing ALTER TABLE ALTER COLUMN TYPE
authorAndrew Dunstan <andrew@dunslane.net>
Thu, 10 Jan 2019 20:53:45 +0000 (15:53 -0500)
committerAndrew Dunstan <andrew@dunslane.net>
Thu, 10 Jan 2019 21:24:57 +0000 (16:24 -0500)
commit076ffbcb5f45eeffb20940842e0f45bdcb4a32fc
tree7df2592bd119f92df9c9a03d7f40d9350ee15989
parent312d21d8635065c14d392b4e5469e7abc03f2bde
Fix missing values when doing ALTER TABLE ALTER COLUMN TYPE

This was an oversight in commit 16828d5c. If the table is going to be
rewritten, we simply clear all the missing values from all the table's
attributes, since there will no longer be any rows with the attributes
missing. Otherwise, we repackage the missing value in an array
constructed with the new type specifications.

Backpatch to release 11.

This fixes bug #15446, reported by Dmitry Molotkov

Reviewed by Dean Rasheed
src/backend/commands/tablecmds.c
src/test/regress/expected/fast_default.out
src/test/regress/sql/fast_default.sql