summaryrefslogtreecommitdiff
path: root/src/backend/commands/tablespace.c
diff options
context:
space:
mode:
authorRobert Haas2013-03-07 01:52:06 +0000
committerRobert Haas2013-03-07 01:53:25 +0000
commitf90cc269823ba5282341a197c7387f5ada6703a6 (patch)
tree3413394a2dca79c531ec3c79e8f075ad0bc89f9d /src/backend/commands/tablespace.c
parentf11af2bcab36b51a7e41df7986d6f030459d7d09 (diff)
Code beautification for object-access hook machinery.
KaiGai Kohei
Diffstat (limited to 'src/backend/commands/tablespace.c')
-rw-r--r--src/backend/commands/tablespace.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/backend/commands/tablespace.c b/src/backend/commands/tablespace.c
index 7cad0cc969d..dfcc829b85f 100644
--- a/src/backend/commands/tablespace.c
+++ b/src/backend/commands/tablespace.c
@@ -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)