aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/user.c
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2005-11-22 18:17:34 +0000
committerBruce Momjian <bruce@momjian.us>2005-11-22 18:17:34 +0000
commit436a2956d80db29ac1dff640b631620d856b4f70 (patch)
treedb2252048385dd23a7d7a196e8685cb0a5816f7a /src/backend/commands/user.c
parente196eedd8a95380fb392c00b9e7ea88a0e46053e (diff)
downloadpostgresql-436a2956d80db29ac1dff640b631620d856b4f70.tar.gz
postgresql-436a2956d80db29ac1dff640b631620d856b4f70.zip
Re-run pgindent, fixing a problem where comment lines after a blank
comment line where output as too long, and update typedefs for /lib directory. Also fix case where identifiers were used as variable names in the backend, but as typedefs in ecpg (favor the backend for indenting). Backpatch to 8.1.X.
Diffstat (limited to 'src/backend/commands/user.c')
-rw-r--r--src/backend/commands/user.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/backend/commands/user.c b/src/backend/commands/user.c
index 9ac3c8a97ef..381ebe24adf 100644
--- a/src/backend/commands/user.c
+++ b/src/backend/commands/user.c
@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/backend/commands/user.c,v 1.165 2005/11/21 12:49:31 alvherre Exp $
+ * $PostgreSQL: pgsql/src/backend/commands/user.c,v 1.166 2005/11/22 18:17:09 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1124,15 +1124,15 @@ GrantRole(GrantRoleStmt *stmt)
* Drop the objects owned by a given list of roles.
*/
void
-DropOwnedObjects(DropOwnedStmt *stmt)
+DropOwnedObjects(DropOwnedStmt * stmt)
{
- List *role_ids = roleNamesToIds(stmt->roles);
- ListCell *cell;
+ List *role_ids = roleNamesToIds(stmt->roles);
+ ListCell *cell;
/* Check privileges */
- foreach (cell, role_ids)
+ foreach(cell, role_ids)
{
- Oid roleid = lfirst_oid(cell);
+ Oid roleid = lfirst_oid(cell);
if (!has_privs_of_role(GetUserId(), roleid))
ereport(ERROR,
@@ -1150,16 +1150,16 @@ DropOwnedObjects(DropOwnedStmt *stmt)
* Give the objects owned by a given list of roles away to another user.
*/
void
-ReassignOwnedObjects(ReassignOwnedStmt *stmt)
+ReassignOwnedObjects(ReassignOwnedStmt * stmt)
{
List *role_ids = roleNamesToIds(stmt->roles);
ListCell *cell;
Oid newrole;
/* Check privileges */
- foreach (cell, role_ids)
+ foreach(cell, role_ids)
{
- Oid roleid = lfirst_oid(cell);
+ Oid roleid = lfirst_oid(cell);
if (!has_privs_of_role(GetUserId(), roleid))
ereport(ERROR,
@@ -1171,9 +1171,9 @@ ReassignOwnedObjects(ReassignOwnedStmt *stmt)
newrole = get_roleid_checked(stmt->newrole);
if (!has_privs_of_role(GetUserId(), newrole))
- ereport(ERROR,
- (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
- errmsg("permission denied to reassign objects")));
+ ereport(ERROR,
+ (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
+ errmsg("permission denied to reassign objects")));
/* Ok, do it */
shdepReassignOwned(role_ids, newrole);