1
0
mirror of https://github.com/postgres/postgres.git synced 2025-09-02 04:21:28 +03:00

Avoid using DefElemAction in AlterPublicationStmt

Create a new enum type for it.  This allows to add new values for future
functionality without disrupting unrelated uses of DefElem.

Discussion: https://postgr.es/m/202112302021.ca7ihogysgh3@alvherre.pgsql
This commit is contained in:
Alvaro Herrera
2022-01-03 10:48:48 -03:00
parent 234ba62769
commit 9623d89996
3 changed files with 21 additions and 14 deletions

View File

@@ -9828,7 +9828,7 @@ AlterPublicationStmt:
n->pubname = $3;
n->pubobjects = $5;
preprocess_pubobj_list(n->pubobjects, yyscanner);
n->action = DEFELEM_ADD;
n->action = AP_AddObjects;
$$ = (Node *)n;
}
| ALTER PUBLICATION name SET pub_obj_list
@@ -9837,7 +9837,7 @@ AlterPublicationStmt:
n->pubname = $3;
n->pubobjects = $5;
preprocess_pubobj_list(n->pubobjects, yyscanner);
n->action = DEFELEM_SET;
n->action = AP_SetObjects;
$$ = (Node *)n;
}
| ALTER PUBLICATION name DROP pub_obj_list
@@ -9846,7 +9846,7 @@ AlterPublicationStmt:
n->pubname = $3;
n->pubobjects = $5;
preprocess_pubobj_list(n->pubobjects, yyscanner);
n->action = DEFELEM_DROP;
n->action = AP_DropObjects;
$$ = (Node *)n;
}
;