pgsql: Fix missing values when doing ALTER TABLE ALTER COLUMN TYPE - Mailing list pgsql-committers

From Andrew Dunstan
Subject pgsql: Fix missing values when doing ALTER TABLE ALTER COLUMN TYPE
Date
Msg-id E1ghhpT-0006ya-1x@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/3b174b1a355f0de2d433c16eb350b3356bdd08b8

Modified Files
--------------
src/backend/commands/tablecmds.c           | 77 ++++++++++++++++++++++++++++++
src/test/regress/expected/fast_default.out | 37 ++++++++++++++
src/test/regress/sql/fast_default.sql      | 26 ++++++++++
3 files changed, 140 insertions(+)


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Add .gitignore entry for a derived file created by "makedistpre
Next
From: Amit Kapila
Date:
Subject: pgsql: Extend pg_stat_statements_reset to reset statistics specificto