Rearrange "add column" logic to merge columns at exec time.
Robert Haas <rhaas@postgresql.org>
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.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/commands/tablecmds.c | modified | +88 −73 |
| src/include/nodes/parsenodes.h | modified | +2 −0 |
| src/test/regress/expected/alter_table.out | modified | +17 −0 |
| src/test/regress/sql/alter_table.sql | modified | +12 −0 |