mirror of
https://github.com/postgres/postgres.git
synced 2025-06-16 06:01:02 +03:00
Code beautification for object-access hook machinery.
KaiGai Kohei
This commit is contained in:
@ -524,8 +524,7 @@ createdb(const CreatedbStmt *stmt)
|
||||
copyTemplateDependencies(src_dboid, dboid);
|
||||
|
||||
/* Post creation hook for new database */
|
||||
InvokeObjectAccessHook(OAT_POST_CREATE,
|
||||
DatabaseRelationId, dboid, 0, NULL);
|
||||
InvokeObjectPostCreateHook(DatabaseRelationId, dboid, 0);
|
||||
|
||||
/*
|
||||
* Force a checkpoint before starting the copy. This will force dirty
|
||||
@ -816,14 +815,7 @@ dropdb(const char *dbname, bool missing_ok)
|
||||
dbname);
|
||||
|
||||
/* DROP hook for the database being removed */
|
||||
if (object_access_hook)
|
||||
{
|
||||
ObjectAccessDrop drop_arg;
|
||||
|
||||
memset(&drop_arg, 0, sizeof(ObjectAccessDrop));
|
||||
InvokeObjectAccessHook(OAT_DROP,
|
||||
DatabaseRelationId, db_id, 0, &drop_arg);
|
||||
}
|
||||
InvokeObjectDropHook(DatabaseRelationId, db_id, 0);
|
||||
|
||||
/*
|
||||
* Disallow dropping a DB that is marked istemplate. This is just to
|
||||
|
Reference in New Issue
Block a user