mirror of
https://github.com/postgres/postgres.git
synced 2025-11-07 19:06:32 +03:00
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 31b6fc06d8, which
fixes a similar bug in ALTER TABLE .. ADD CONSTRAINT.
Patch by Noah Misch.
This commit is contained in:
@@ -1173,6 +1173,7 @@ typedef struct AlterTableStmt
|
||||
typedef enum AlterTableType
|
||||
{
|
||||
AT_AddColumn, /* add column */
|
||||
AT_AddColumnRecurse, /* internal to commands/tablecmds.c */
|
||||
AT_AddColumnToView, /* implicitly via CREATE OR REPLACE VIEW */
|
||||
AT_ColumnDefault, /* alter column default */
|
||||
AT_DropNotNull, /* alter column drop not null */
|
||||
@@ -1198,6 +1199,7 @@ typedef enum AlterTableType
|
||||
AT_ClusterOn, /* CLUSTER ON */
|
||||
AT_DropCluster, /* SET WITHOUT CLUSTER */
|
||||
AT_AddOids, /* SET WITH OIDS */
|
||||
AT_AddOidsRecurse, /* internal to commands/tablecmds.c */
|
||||
AT_DropOids, /* SET WITHOUT OIDS */
|
||||
AT_SetTableSpace, /* SET TABLESPACE */
|
||||
AT_SetRelOptions, /* SET (...) -- AM specific parameters */
|
||||
|
||||
Reference in New Issue
Block a user