1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-07 00:36:50 +03:00

Make more use of RoleSpec struct

Most code was casting this through a generic Node.  By declaring
everything as RoleSpec appropriately, we can remove a bunch of casts and
ad-hoc node type checking.

Reviewed-by: Alvaro Herrera <alvherre@2ndquadrant.com>
This commit is contained in:
Peter Eisentraut
2016-12-28 12:00:00 -05:00
parent f0774abde8
commit 2e254130d1
7 changed files with 41 additions and 54 deletions

View File

@ -177,7 +177,7 @@ policy_role_list_to_array(List *roles, int *num_roles)
}
else
role_oids[i++] =
ObjectIdGetDatum(get_rolespec_oid((Node *) spec, false));
ObjectIdGetDatum(get_rolespec_oid(spec, false));
}
return role_oids;