extract role DistributeObjectOps

refactor/dist-ops-linker
Nils Dijk 2020-02-07 01:30:54 +01:00
parent e1f9f37206
commit 2e0b395c26
No known key found for this signature in database
GPG Key ID: CA1177EF9434F241
3 changed files with 12 additions and 11 deletions

View File

@ -23,15 +23,6 @@ static DistributeObjectOps NoDistributeOps = {
.address = NULL,
};
static DistributeObjectOps Any_AlterRole = {
.deparse = DeparseAlterRoleStmt,
.qualify = NULL,
.preprocess = NULL,
.postprocess = PostprocessAlterRoleStmt,
.address = NULL,
};
REGISTER_DISTRIBUTED_OPERATION(AlterRoleStmt, Any_AlterRole);
static DistributeObjectOps Any_AlterTableMoveAll = {
.deparse = NULL,
.qualify = NULL,

View File

@ -37,12 +37,23 @@ static DefElem * makeDefElemInt(char *name, int value);
/* controlled via GUC */
bool EnableAlterRolePropagation = false;
/* DistributeObjectOps */
static List * PostprocessAlterRoleStmt(Node *node, const char *queryString);
static DistributeObjectOps Any_AlterRole = {
.deparse = DeparseAlterRoleStmt,
.qualify = NULL,
.preprocess = NULL,
.postprocess = PostprocessAlterRoleStmt,
.address = NULL,
};
REGISTER_DISTRIBUTED_OPERATION(AlterRoleStmt, Any_AlterRole);
/*
* PostprocessAlterRoleStmt actually creates the plan we need to execute for alter
* role statement. We need to do it this way because we need to use the encrypted
* password, which is, in some cases, created at standardProcessUtility.
*/
List *
static List *
PostprocessAlterRoleStmt(Node *node, const char *queryString)
{
AlterRoleStmt *stmt = castNode(AlterRoleStmt, node);

View File

@ -205,7 +205,6 @@ extern List * PreprocessRenameAttributeStmt(Node *stmt, const char *queryString)
/* role.c - forward declarations*/
extern List * PostprocessAlterRoleStmt(Node *stmt, const char *queryString);
extern List * GenerateAlterRoleIfExistsCommandAllRoles(void);