mirror of
https://github.com/postgres/postgres.git
synced 2025-07-07 00:36:50 +03:00
Code beautification for object-access hook machinery.
KaiGai Kohei
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user