1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-05 07:21:24 +03:00

Code beautification for object-access hook machinery.

KaiGai Kohei
This commit is contained in:
Robert Haas
2013-03-06 20:52:06 -05:00
parent f11af2bcab
commit f90cc26982
29 changed files with 123 additions and 119 deletions

View File

@ -331,8 +331,7 @@ CreateTableSpace(CreateTableSpaceStmt *stmt)
recordDependencyOnOwner(TableSpaceRelationId, tablespaceoid, ownerId);
/* Post creation hook for new tablespace */
InvokeObjectAccessHook(OAT_POST_CREATE,
TableSpaceRelationId, tablespaceoid, 0, NULL);
InvokeObjectPostCreateHook(TableSpaceRelationId, tablespaceoid, 0);
create_tablespace_directories(location, tablespaceoid);
@ -439,14 +438,7 @@ DropTableSpace(DropTableSpaceStmt *stmt)
tablespacename);
/* DROP hook for the tablespace being removed */
if (object_access_hook)
{
ObjectAccessDrop drop_arg;
memset(&drop_arg, 0, sizeof(ObjectAccessDrop));
InvokeObjectAccessHook(OAT_DROP, TableSpaceRelationId,
tablespaceoid, 0, &drop_arg);
}
InvokeObjectDropHook(TableSpaceRelationId, tablespaceoid, 0);
/*
* Remove the pg_tablespace tuple (this will roll back if we fail below)