pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix missing values when doing ALTER TABLE ALTER COLUMN TYPE
2+ messages / 1 participants
[nested] [flat]

* pgsql: Fix missing values when doing ALTER TABLE ALTER COLUMN TYPE
@ 2019-01-10 21:25  Andrew Dunstan <andrew@dunslane.net>
  0 siblings, 0 replies; 2+ messages in thread

From: Andrew Dunstan @ 2019-01-10 21:25 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/076ffbcb5f45eeffb20940842e0f45bdcb4a32fc

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(+)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* pgsql: Fix missing values when doing ALTER TABLE ALTER COLUMN TYPE
@ 2019-01-10 21:25  Andrew Dunstan <andrew@dunslane.net>
  0 siblings, 0 replies; 2+ messages in thread

From: Andrew Dunstan @ 2019-01-10 21:25 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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(+)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2019-01-10 21:25 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-01-10 21:25 pgsql: Fix missing values when doing ALTER TABLE ALTER COLUMN TYPE Andrew Dunstan <andrew@dunslane.net>
2019-01-10 21:25 pgsql: Fix missing values when doing ALTER TABLE ALTER COLUMN TYPE Andrew Dunstan <andrew@dunslane.net>

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