|
18 | 18 | #include "catalog/catalog.h"
|
19 | 19 | #include "catalog/dependency.h"
|
20 | 20 | #include "catalog/indexing.h"
|
| 21 | +#include "catalog/objectaccess.h" |
21 | 22 | #include "catalog/pg_foreign_data_wrapper.h"
|
22 | 23 | #include "catalog/pg_foreign_server.h"
|
23 | 24 | #include "catalog/pg_proc.h"
|
@@ -415,6 +416,10 @@ CreateForeignDataWrapper(CreateFdwStmt *stmt)
|
415 | 416 |
|
416 | 417 | recordDependencyOnOwner(ForeignDataWrapperRelationId, fdwId, ownerId);
|
417 | 418 |
|
| 419 | + /* Post creation hook for new foreign data wrapper */ |
| 420 | + InvokeObjectAccessHook(OAT_POST_CREATE, |
| 421 | + ForeignDataWrapperRelationId, fdwId, 0); |
| 422 | + |
418 | 423 | heap_close(rel, NoLock);
|
419 | 424 | }
|
420 | 425 |
|
@@ -696,6 +701,9 @@ CreateForeignServer(CreateForeignServerStmt *stmt)
|
696 | 701 |
|
697 | 702 | recordDependencyOnOwner(ForeignServerRelationId, srvId, ownerId);
|
698 | 703 |
|
| 704 | + /* Post creation hook for new foreign server */ |
| 705 | + InvokeObjectAccessHook(OAT_POST_CREATE, ForeignServerRelationId, srvId, 0); |
| 706 | + |
699 | 707 | heap_close(rel, NoLock);
|
700 | 708 | }
|
701 | 709 |
|
@@ -967,6 +975,9 @@ CreateUserMapping(CreateUserMappingStmt *stmt)
|
967 | 975 | /* Record the mapped user dependency */
|
968 | 976 | recordDependencyOnOwner(UserMappingRelationId, umId, useId);
|
969 | 977 |
|
| 978 | + /* Post creation hook for new user mapping */ |
| 979 | + InvokeObjectAccessHook(OAT_POST_CREATE, UserMappingRelationId, umId, 0); |
| 980 | + |
970 | 981 | heap_close(rel, NoLock);
|
971 | 982 | }
|
972 | 983 |
|
|
0 commit comments