diff options
author | Robert Haas | 2016-06-09 22:02:36 +0000 |
---|---|---|
committer | Robert Haas | 2016-06-09 22:02:36 +0000 |
commit | 4bc424b968058c7f0aa685821d7039e86faac99c (patch) | |
tree | a4e245ae67bd11edb3926ff5fb3b0223438ac283 /src/backend/commands/policy.c | |
parent | 9164deea2f4ac90ee5e008ff41fc5ad4423887b2 (diff) |
pgindent run for 9.6
Diffstat (limited to 'src/backend/commands/policy.c')
-rw-r--r-- | src/backend/commands/policy.c | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/src/backend/commands/policy.c b/src/backend/commands/policy.c index 93d15e477af..bc2e4af82a3 100644 --- a/src/backend/commands/policy.c +++ b/src/backend/commands/policy.c @@ -496,7 +496,7 @@ RemoveRoleFromObjectPolicy(Oid roleid, Oid classid, Oid policy_id) /* Must own relation. */ if (pg_class_ownercheck(relid, GetUserId())) - noperm = false; /* user is allowed to modify this policy */ + noperm = false; /* user is allowed to modify this policy */ else ereport(WARNING, (errcode(ERRCODE_WARNING_PRIVILEGE_NOT_REVOKED), @@ -511,15 +511,16 @@ RemoveRoleFromObjectPolicy(Oid roleid, Oid classid, Oid policy_id) */ if (!noperm && num_roles > 0) { - int i, j; + int i, + j; Oid *roles = (Oid *) ARR_DATA_PTR(policy_roles); Datum *role_oids; char *qual_value; Node *qual_expr; - List *qual_parse_rtable = NIL; + List *qual_parse_rtable = NIL; char *with_check_value; Node *with_check_qual; - List *with_check_parse_rtable = NIL; + List *with_check_parse_rtable = NIL; Datum values[Natts_pg_policy]; bool isnull[Natts_pg_policy]; bool replaces[Natts_pg_policy]; @@ -536,15 +537,14 @@ RemoveRoleFromObjectPolicy(Oid roleid, Oid classid, Oid policy_id) /* * All of the dependencies will be removed from the policy and then - * re-added. In order to get them correct, we need to extract out - * the expressions in the policy and construct a parsestate just - * enough to build the range table(s) to then pass to - * recordDependencyOnExpr(). + * re-added. In order to get them correct, we need to extract out the + * expressions in the policy and construct a parsestate just enough to + * build the range table(s) to then pass to recordDependencyOnExpr(). */ /* Get policy qual, to update dependencies */ value_datum = heap_getattr(tuple, Anum_pg_policy_polqual, - RelationGetDescr(pg_policy_rel), &attr_isnull); + RelationGetDescr(pg_policy_rel), &attr_isnull); if (!attr_isnull) { ParseState *qual_pstate; @@ -566,7 +566,7 @@ RemoveRoleFromObjectPolicy(Oid roleid, Oid classid, Oid policy_id) /* Get WITH CHECK qual, to update dependencies */ value_datum = heap_getattr(tuple, Anum_pg_policy_polwithcheck, - RelationGetDescr(pg_policy_rel), &attr_isnull); + RelationGetDescr(pg_policy_rel), &attr_isnull); if (!attr_isnull) { ParseState *with_check_pstate; @@ -665,7 +665,7 @@ RemoveRoleFromObjectPolicy(Oid roleid, Oid classid, Oid policy_id) heap_close(pg_policy_rel, RowExclusiveLock); - return(noperm || num_roles > 0); + return (noperm || num_roles > 0); } /* @@ -996,8 +996,8 @@ AlterPolicy(AlterPolicyStmt *stmt) /* Get policy command */ polcmd_datum = heap_getattr(policy_tuple, Anum_pg_policy_polcmd, - RelationGetDescr(pg_policy_rel), - &polcmd_isnull); + RelationGetDescr(pg_policy_rel), + &polcmd_isnull); Assert(!polcmd_isnull); polcmd = DatumGetChar(polcmd_datum); @@ -1029,15 +1029,15 @@ AlterPolicy(AlterPolicyStmt *stmt) } else { - Oid *roles; + Oid *roles; Datum roles_datum; bool attr_isnull; ArrayType *policy_roles; /* - * We need to pull the set of roles this policy applies to from - * what's in the catalog, so that we can recreate the dependencies - * correctly for the policy. + * We need to pull the set of roles this policy applies to from what's + * in the catalog, so that we can recreate the dependencies correctly + * for the policy. */ roles_datum = heap_getattr(policy_tuple, Anum_pg_policy_polroles, @@ -1065,13 +1065,13 @@ AlterPolicy(AlterPolicyStmt *stmt) } else { - Datum value_datum; - bool attr_isnull; + Datum value_datum; + bool attr_isnull; /* * We need to pull the USING expression and build the range table for - * the policy from what's in the catalog, so that we can recreate - * the dependencies correctly for the policy. + * the policy from what's in the catalog, so that we can recreate the + * dependencies correctly for the policy. */ /* Check if the policy has a USING expr */ @@ -1106,8 +1106,8 @@ AlterPolicy(AlterPolicyStmt *stmt) } else { - Datum value_datum; - bool attr_isnull; + Datum value_datum; + bool attr_isnull; /* * We need to pull the WITH CHECK expression and build the range table |