mirror of https://github.com/citusdata/citus.git
Fixes indentation
parent
0e05dd3c27
commit
15817ab924
|
@ -2074,6 +2074,7 @@ GetDistributeObjectOps(Node *node)
|
|||
{
|
||||
return &Database_Grant;
|
||||
}
|
||||
|
||||
#if PG_VERSION_NUM >= PG_VERSION_15
|
||||
case OBJECT_PARAMETER_ACL:
|
||||
{
|
||||
|
|
|
@ -68,10 +68,11 @@ GenerateGrantOnParameterFromAclItem(char *parameterName, AclItem *aclItem)
|
|||
return queries;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* CheckAndAppendQuery checks if the aclItem has the given mode and if it has, it appends the
|
||||
* corresponding query to the queries list.
|
||||
*/
|
||||
*/
|
||||
static void
|
||||
CheckAndAppendQuery(List **queries, AclItem *aclItem, Oid granteeOid, char *parameterName,
|
||||
AclMode mode, char *modeStr)
|
||||
|
@ -92,10 +93,11 @@ CheckAndAppendQuery(List **queries, AclItem *aclItem, Oid granteeOid, char *para
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* CheckPermissionsAndGrants checks if the aclItem has the valid permissions and grants
|
||||
* for the given modes.
|
||||
*/
|
||||
* CheckPermissionsAndGrants checks if the aclItem has the valid permissions and grants
|
||||
* for the given modes.
|
||||
*/
|
||||
static void
|
||||
CheckPermissionsAndGrants(AclItem *aclItem, AclMode modes[], int numModes)
|
||||
{
|
||||
|
@ -105,7 +107,8 @@ CheckPermissionsAndGrants(AclItem *aclItem, AclMode modes[], int numModes)
|
|||
for (int i = 0; i < numModes; i++)
|
||||
{
|
||||
AclMode mode = modes[i];
|
||||
if(!(grants & mode) || (permissions & mode)){
|
||||
if (!(grants & mode) || (permissions & mode))
|
||||
{
|
||||
ereport(ERROR, (errmsg("ACL item has no grant option for mode %lu", mode)));
|
||||
}
|
||||
}
|
||||
|
@ -166,4 +169,6 @@ GrantOnParameters(void)
|
|||
|
||||
return commands;
|
||||
}
|
||||
|
||||
|
||||
#endif /* PG_VERSION_NUM >= PG_VERSION_15 */
|
||||
|
|
|
@ -62,4 +62,6 @@ DeparseGrantOnParameterStmt(Node *node)
|
|||
|
||||
return str.data;
|
||||
}
|
||||
|
||||
|
||||
#endif /* PG_VERSION_NUM >= PG_VERSION_15 */
|
||||
|
|
|
@ -2165,6 +2165,7 @@ GenerateGrantStmtForRights(ObjectType objectType,
|
|||
withGrantOption);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* GenerateGrantStmtForRightsWithObjectName is the function for creating
|
||||
* GrantStmt's for all types of objects that are supported with object name.
|
||||
|
@ -2183,6 +2184,7 @@ GenerateGrantStmtForRightsWithObjectName(ObjectType objectType,
|
|||
permission, withGrantOption);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* BaseGenerateGrantStmtForRights is the base function for creating
|
||||
* GrantStmt's for all types of objects that are supported with object .
|
||||
|
|
|
@ -448,6 +448,7 @@ extern List * PreprocessDropOwnedStmt(Node *node, const char *queryString,
|
|||
extern List * PostprocessReassignOwnedStmt(Node *node, const char *queryString);
|
||||
|
||||
#if PG_VERSION_NUM >= PG_VERSION_15
|
||||
|
||||
/* parameter.c - forward declarations */
|
||||
extern List * PostprocessGrantParameterStmt(Node *node, const char *queryString);
|
||||
#endif /* PG_VERSION_NUM >= PG_VERSION_15 */
|
||||
|
|
|
@ -255,6 +255,7 @@ extern char * DeparseDropDatabaseStmt(Node *node);
|
|||
extern char * DeparseAlterDatabaseRenameStmt(Node *node);
|
||||
|
||||
#if PG_VERSION_NUM >= PG_VERSION_15
|
||||
|
||||
/* forward declarations for deparse_parameter_stmts.c*/
|
||||
extern char * DeparseGrantOnParameterStmt(Node *node);
|
||||
#endif /* PG_VERSION_NUM >= PG_VERSION_15 */
|
||||
|
|
Loading…
Reference in New Issue