1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-08 11:42:09 +03:00

Add missing invocations to object access hooks

The following commands have been missing calls to object access hooks
InvokeObjectPost{Create|Alter}Hook normally applied to all commands:
- ALTER RULE RENAME TO
- ALTER USER MAPPING
- CREATE ACCESS METHOD
- CREATE STATISTICS

Thanks also to Robert Haas for the discussion.

Author: Mark Dilger
Reviewed-by: Álvaro Herrera, Michael Paquier
Discussion: https://postgr.es/m/435CD295-F409-44E0-91EC-DF32C7AFCD76@enterprisedb.com
This commit is contained in:
Michael Paquier
2020-05-23 14:03:04 +09:00
parent c99cec96b8
commit a995b371ae
4 changed files with 10 additions and 0 deletions

View File

@ -18,6 +18,7 @@
#include "catalog/catalog.h"
#include "catalog/dependency.h"
#include "catalog/indexing.h"
#include "catalog/objectaccess.h"
#include "catalog/pg_am.h"
#include "catalog/pg_proc.h"
#include "catalog/pg_type.h"
@ -107,6 +108,8 @@ CreateAccessMethod(CreateAmStmt *stmt)
recordDependencyOnCurrentExtension(&myself, false);
InvokeObjectPostCreateHook(AccessMethodRelationId, amoid, 0);
table_close(rel, RowExclusiveLock);
return myself;