diff options
author | Robert Haas <rhaas@postgresql.org> | 2013-03-06 20:52:06 -0500 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2013-03-06 20:53:25 -0500 |
commit | f90cc269823ba5282341a197c7387f5ada6703a6 (patch) | |
tree | 3413394a2dca79c531ec3c79e8f075ad0bc89f9d /src/backend/commands/dbcommands.c | |
parent | f11af2bcab36b51a7e41df7986d6f030459d7d09 (diff) | |
download | postgresql-f90cc269823ba5282341a197c7387f5ada6703a6.tar.gz postgresql-f90cc269823ba5282341a197c7387f5ada6703a6.zip |
Code beautification for object-access hook machinery.
KaiGai Kohei
Diffstat (limited to 'src/backend/commands/dbcommands.c')
-rw-r--r-- | src/backend/commands/dbcommands.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/backend/commands/dbcommands.c b/src/backend/commands/dbcommands.c index 5b06af24a6c..76ef23a1f44 100644 --- a/src/backend/commands/dbcommands.c +++ b/src/backend/commands/dbcommands.c @@ -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 |