Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit13f2db2

Browse files
committed
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 theenum, after all the Constraint-related subcommands.This fixes a compiler warning, added by commite42375f. Backpatch to 9.5,like that patch.
1 parent9aa6634 commit13f2db2

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

‎src/include/nodes/parsenodes.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1474,7 +1474,6 @@ typedef enum AlterTableType
14741474
AT_AddConstraint,/* add constraint */
14751475
AT_AddConstraintRecurse,/* internal to commands/tablecmds.c */
14761476
AT_ReAddConstraint,/* internal to commands/tablecmds.c */
1477-
AT_ReAddComment,/* internal to commands/tablecmds.c */
14781477
AT_AlterConstraint,/* alter constraint */
14791478
AT_ValidateConstraint,/* validate constraint */
14801479
AT_ValidateConstraintRecurse,/* internal to commands/tablecmds.c */
@@ -1483,6 +1482,7 @@ typedef enum AlterTableType
14831482
AT_AddIndexConstraint,/* add constraint using existing index */
14841483
AT_DropConstraint,/* drop constraint */
14851484
AT_DropConstraintRecurse,/* internal to commands/tablecmds.c */
1485+
AT_ReAddComment,/* internal to commands/tablecmds.c */
14861486
AT_AlterColumnType,/* alter column type */
14871487
AT_AlterColumnGenericOptions,/* alter column OPTIONS (...) */
14881488
AT_ChangeOwner,/* change owner */

‎src/test/modules/test_ddl_deparse/test_ddl_deparse.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,9 @@ get_altertable_subcmdtypes(PG_FUNCTION_ARGS)
151151
caseAT_DropConstraintRecurse:
152152
strtype="DROP CONSTRAINT (and recurse)";
153153
break;
154+
caseAT_ReAddComment:
155+
strtype="(re) ADD COMMENT";
156+
break;
154157
caseAT_AlterColumnType:
155158
strtype="ALTER COLUMN SET TYPE";
156159
break;
@@ -253,6 +256,8 @@ get_altertable_subcmdtypes(PG_FUNCTION_ARGS)
253256
caseAT_GenericOptions:
254257
strtype="SET OPTIONS";
255258
break;
259+
default:
260+
strtype="unrecognized";
256261
}
257262

258263
astate=

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp