aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/user.c
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2013-03-06 20:52:06 -0500
committerRobert Haas <rhaas@postgresql.org>2013-03-06 20:53:25 -0500
commitf90cc269823ba5282341a197c7387f5ada6703a6 (patch)
tree3413394a2dca79c531ec3c79e8f075ad0bc89f9d /src/backend/commands/user.c
parentf11af2bcab36b51a7e41df7986d6f030459d7d09 (diff)
downloadpostgresql-f90cc269823ba5282341a197c7387f5ada6703a6.tar.gz
postgresql-f90cc269823ba5282341a197c7387f5ada6703a6.zip
Code beautification for object-access hook machinery.
KaiGai Kohei
Diffstat (limited to 'src/backend/commands/user.c')
-rw-r--r--src/backend/commands/user.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/backend/commands/user.c b/src/backend/commands/user.c
index 5edb59af36b..93024163755 100644
--- a/src/backend/commands/user.c
+++ b/src/backend/commands/user.c
@@ -426,8 +426,7 @@ CreateRole(CreateRoleStmt *stmt)
GetUserId(), false);
/* Post creation hook for new role */
- InvokeObjectAccessHook(OAT_POST_CREATE,
- AuthIdRelationId, roleid, 0, NULL);
+ InvokeObjectPostCreateHook(AuthIdRelationId, roleid, 0);
/*
* Close pg_authid, but keep lock till commit.
@@ -968,14 +967,7 @@ DropRole(DropRoleStmt *stmt)
errmsg("must be superuser to drop superusers")));
/* DROP hook for the role being removed */
- if (object_access_hook)
- {
- ObjectAccessDrop drop_arg;
-
- memset(&drop_arg, 0, sizeof(ObjectAccessDrop));
- InvokeObjectAccessHook(OAT_DROP,
- AuthIdRelationId, roleid, 0, &drop_arg);
- }
+ InvokeObjectDropHook(AuthIdRelationId, roleid, 0);
/*
* Lock the role, so nobody can add dependencies to her while we drop