1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-08 11:42:09 +03:00

pgindent run for 9.6

This commit is contained in:
Robert Haas
2016-06-09 18:02:36 -04:00
parent 9164deea2f
commit 4bc424b968
252 changed files with 2670 additions and 2558 deletions

View File

@ -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