mirror of
https://github.com/postgres/postgres.git
synced 2025-05-18 17:41:14 +03:00
Handle AT_ReAddComment in test_ddl_deparse, and add a catch-all default.
In the passing, also move AT_ReAddComment to more logical position in the enum, after all the Constraint-related subcommands. This fixes a compiler warning, added by commit e42375fc. Backpatch to 9.5, like that patch.
This commit is contained in:
parent
9aa663463b
commit
13f2db2ffb
@ -1474,7 +1474,6 @@ typedef enum AlterTableType
|
|||||||
AT_AddConstraint, /* add constraint */
|
AT_AddConstraint, /* add constraint */
|
||||||
AT_AddConstraintRecurse, /* internal to commands/tablecmds.c */
|
AT_AddConstraintRecurse, /* internal to commands/tablecmds.c */
|
||||||
AT_ReAddConstraint, /* internal to commands/tablecmds.c */
|
AT_ReAddConstraint, /* internal to commands/tablecmds.c */
|
||||||
AT_ReAddComment, /* internal to commands/tablecmds.c */
|
|
||||||
AT_AlterConstraint, /* alter constraint */
|
AT_AlterConstraint, /* alter constraint */
|
||||||
AT_ValidateConstraint, /* validate constraint */
|
AT_ValidateConstraint, /* validate constraint */
|
||||||
AT_ValidateConstraintRecurse, /* internal to commands/tablecmds.c */
|
AT_ValidateConstraintRecurse, /* internal to commands/tablecmds.c */
|
||||||
@ -1483,6 +1482,7 @@ typedef enum AlterTableType
|
|||||||
AT_AddIndexConstraint, /* add constraint using existing index */
|
AT_AddIndexConstraint, /* add constraint using existing index */
|
||||||
AT_DropConstraint, /* drop constraint */
|
AT_DropConstraint, /* drop constraint */
|
||||||
AT_DropConstraintRecurse, /* internal to commands/tablecmds.c */
|
AT_DropConstraintRecurse, /* internal to commands/tablecmds.c */
|
||||||
|
AT_ReAddComment, /* internal to commands/tablecmds.c */
|
||||||
AT_AlterColumnType, /* alter column type */
|
AT_AlterColumnType, /* alter column type */
|
||||||
AT_AlterColumnGenericOptions, /* alter column OPTIONS (...) */
|
AT_AlterColumnGenericOptions, /* alter column OPTIONS (...) */
|
||||||
AT_ChangeOwner, /* change owner */
|
AT_ChangeOwner, /* change owner */
|
||||||
|
@ -151,6 +151,9 @@ get_altertable_subcmdtypes(PG_FUNCTION_ARGS)
|
|||||||
case AT_DropConstraintRecurse:
|
case AT_DropConstraintRecurse:
|
||||||
strtype = "DROP CONSTRAINT (and recurse)";
|
strtype = "DROP CONSTRAINT (and recurse)";
|
||||||
break;
|
break;
|
||||||
|
case AT_ReAddComment:
|
||||||
|
strtype = "(re) ADD COMMENT";
|
||||||
|
break;
|
||||||
case AT_AlterColumnType:
|
case AT_AlterColumnType:
|
||||||
strtype = "ALTER COLUMN SET TYPE";
|
strtype = "ALTER COLUMN SET TYPE";
|
||||||
break;
|
break;
|
||||||
@ -253,6 +256,8 @@ get_altertable_subcmdtypes(PG_FUNCTION_ARGS)
|
|||||||
case AT_GenericOptions:
|
case AT_GenericOptions:
|
||||||
strtype = "SET OPTIONS";
|
strtype = "SET OPTIONS";
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
strtype = "unrecognized";
|
||||||
}
|
}
|
||||||
|
|
||||||
astate =
|
astate =
|
||||||
|
Loading…
x
Reference in New Issue
Block a user