]> granicus.if.org Git - postgresql/commit
Rearrange "add column" logic to merge columns at exec time.
authorRobert Haas <rhaas@postgresql.org>
Mon, 4 Apr 2011 01:52:47 +0000 (21:52 -0400)
committerRobert Haas <rhaas@postgresql.org>
Mon, 4 Apr 2011 01:53:32 +0000 (21:53 -0400)
commit6c5723998594dffa5d47c3cf8c96ccf89c033aae
tree2b1ac2c585d2df36a20ecd2d3aefc4573a21691d
parentcabf5d84b6d1a92ab97492d7e3d650548a9992cd
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.
src/backend/commands/tablecmds.c
src/include/nodes/parsenodes.h
src/test/regress/expected/alter_table.out
src/test/regress/sql/alter_table.sql