Rearrange "add column" logic to merge columns at exec time.
The previous coding set attinhcount too high in some cases, resulting in
an undumpable, undroppable column. Per bug #5856, reported by Naoya
Anzai. See also commit 31b6fc06d83c6de3644c8f2921eb7de0eb92fac3, which
fixes a similar bug in ALTER TABLE .. ADD CONSTRAINT.
Patch by Noah Misch.
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/6c5723998594dffa5d47c3cf8c96ccf89c033aae
Modified Files
--------------
src/backend/commands/tablecmds.c | 161 ++++++++++++++++-------------
src/include/nodes/parsenodes.h | 2 +
src/test/regress/expected/alter_table.out | 17 +++
src/test/regress/sql/alter_table.sql | 12 ++
4 files changed, 119 insertions(+), 73 deletions(-)