mirror of https://github.com/citusdata/citus.git
extract role DistributeObjectOps
parent
e1f9f37206
commit
2e0b395c26
|
@ -23,15 +23,6 @@ static DistributeObjectOps NoDistributeOps = {
|
||||||
.address = NULL,
|
.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 = {
|
static DistributeObjectOps Any_AlterTableMoveAll = {
|
||||||
.deparse = NULL,
|
.deparse = NULL,
|
||||||
.qualify = NULL,
|
.qualify = NULL,
|
||||||
|
|
|
@ -37,12 +37,23 @@ static DefElem * makeDefElemInt(char *name, int value);
|
||||||
/* controlled via GUC */
|
/* controlled via GUC */
|
||||||
bool EnableAlterRolePropagation = false;
|
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
|
* 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
|
* 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.
|
* password, which is, in some cases, created at standardProcessUtility.
|
||||||
*/
|
*/
|
||||||
List *
|
static List *
|
||||||
PostprocessAlterRoleStmt(Node *node, const char *queryString)
|
PostprocessAlterRoleStmt(Node *node, const char *queryString)
|
||||||
{
|
{
|
||||||
AlterRoleStmt *stmt = castNode(AlterRoleStmt, node);
|
AlterRoleStmt *stmt = castNode(AlterRoleStmt, node);
|
||||||
|
|
|
@ -205,7 +205,6 @@ extern List * PreprocessRenameAttributeStmt(Node *stmt, const char *queryString)
|
||||||
|
|
||||||
|
|
||||||
/* role.c - forward declarations*/
|
/* role.c - forward declarations*/
|
||||||
extern List * PostprocessAlterRoleStmt(Node *stmt, const char *queryString);
|
|
||||||
extern List * GenerateAlterRoleIfExistsCommandAllRoles(void);
|
extern List * GenerateAlterRoleIfExistsCommandAllRoles(void);
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue