From 840ff5f451cd9a391d237fc60894fea7ad82a189 Mon Sep 17 00:00:00 2001 From: Alvaro Herrera Date: Mon, 12 Dec 2022 11:13:26 +0100 Subject: Get rid of recursion-marker values in enum AlterTableType During ALTER TABLE execution, when prep-time handling of subcommands of certain types determine that execution-time handling requires recursion, they signal this by changing the subcommand type to a special value. This can be done in a simpler way by using a separate flag introduced by commit ec0925c22a3d, so do that. Catversion bumped. It's not clear to me that ALTER TABLE subcommands are stored anywhere in catalogs (CREATE FUNCTION rejects it in BEGIN ATOMIC function bodies), but we do have both write and read support for them, so be safe. Discussion: https://postgr.es/m/20220929090033.zxuaezcdwh2fgfjb@alvherre.pgsql --- src/backend/parser/parse_utilcmd.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/backend/parser/parse_utilcmd.c') diff --git a/src/backend/parser/parse_utilcmd.c b/src/backend/parser/parse_utilcmd.c index 342a1791338..f743cd548c2 100644 --- a/src/backend/parser/parse_utilcmd.c +++ b/src/backend/parser/parse_utilcmd.c @@ -3362,7 +3362,6 @@ transformAlterTableStmt(Oid relid, AlterTableStmt *stmt, switch (cmd->subtype) { case AT_AddColumn: - case AT_AddColumnRecurse: { ColumnDef *def = castNode(ColumnDef, cmd->def); @@ -3386,7 +3385,6 @@ transformAlterTableStmt(Oid relid, AlterTableStmt *stmt, } case AT_AddConstraint: - case AT_AddConstraintRecurse: /* * The original AddConstraint cmd node doesn't go to newcmds -- cgit v1.2.3