diff options
Diffstat (limited to 'src/backend/commands/user.c')
-rw-r--r-- | src/backend/commands/user.c | 12 |
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 |