From: Andrew Dunstan <andrew@dunslane.net>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix missing values when doing ALTER TABLE ALTER COLUMN TYPE
Date: Thu, 10 Jan 2019 21:25:31 +0000
Message-ID: <E1ghhpT-0006ya-1x@gemulon.postgresql.org> (raw)
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(+)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: andrew@dunslane.net
Subject: Re: pgsql: Fix missing values when doing ALTER TABLE ALTER COLUMN TYPE
In-Reply-To: <E1ghhpT-0006ya-1x@gemulon.postgresql.org>
References: <E1ghhpT-0006ya-1x@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox