
Go to the source code of this file.
Data Structures | |
| struct | ObjectAccessPostCreate |
| struct | ObjectAccessDrop |
| struct | ObjectAccessPostAlter |
| struct | ObjectAccessNamespaceSearch |
Defines | |
| #define | InvokeObjectPostCreateHook(classId, objectId, subId) InvokeObjectPostCreateHookArg((classId),(objectId),(subId),false) |
| #define | InvokeObjectPostCreateHookArg(classId, objectId, subId, is_internal) |
| #define | InvokeObjectDropHook(classId, objectId, subId) InvokeObjectDropHookArg((classId),(objectId),(subId),0) |
| #define | InvokeObjectDropHookArg(classId, objectId, subId, dropflags) |
| #define | InvokeObjectPostAlterHook(classId, objectId, subId) |
| #define | InvokeObjectPostAlterHookArg(classId, objectId, subId,auxiliaryId, is_internal) |
| #define | InvokeNamespaceSearchHook(objectId, ereport_on_violation) |
| #define | InvokeFunctionExecuteHook(objectId) |
Typedefs | |
| typedef enum ObjectAccessType | ObjectAccessType |
| typedef void(* | object_access_hook_type )(ObjectAccessType access, Oid classId, Oid objectId, int subId, void *arg) |
Enumerations | |
| enum | ObjectAccessType { OAT_POST_CREATE, OAT_DROP, OAT_POST_ALTER, OAT_NAMESPACE_SEARCH, OAT_FUNCTION_EXECUTE } |
Functions | |
| void | RunObjectPostCreateHook (Oid classId, Oid objectId, int subId, bool is_internal) |
| void | RunObjectDropHook (Oid classId, Oid objectId, int subId, int dropflags) |
| void | RunObjectPostAlterHook (Oid classId, Oid objectId, int subId, Oid auxiliaryId, bool is_internal) |
| bool | RunNamespaceSearchHook (Oid objectId, bool ereport_on_volation) |
| void | RunFunctionExecuteHook (Oid objectId) |
Variables | |
| PGDLLIMPORT object_access_hook_type | object_access_hook |
| #define InvokeFunctionExecuteHook | ( | objectId | ) |
do { \ if (object_access_hook) \ RunFunctionExecuteHook(objectId); \ } while(0)
Definition at line 181 of file objectaccess.h.
Referenced by ExecEvalArrayCoerceExpr(), ExecInitAgg(), ExecInitWindowAgg(), HandleFunctionRequest(), init_fcache(), and initialize_peragg().
| #define InvokeNamespaceSearchHook | ( | objectId, | ||
| ereport_on_violation | ||||
| ) |
(!object_access_hook \ ? true \ : RunNamespaceSearchHook((objectId), (ereport_on_violation)))
Definition at line 176 of file objectaccess.h.
Referenced by HandleFunctionRequest(), LookupExplicitNamespace(), LookupNamespaceNoError(), and recomputeNamespacePath().
| #define InvokeObjectDropHook | ( | classId, | ||
| objectId, | ||||
| subId | ||||
| ) | InvokeObjectDropHookArg((classId),(objectId),(subId),0) |
Definition at line 156 of file objectaccess.h.
Referenced by dropdb(), DropRole(), and DropTableSpace().
| #define InvokeObjectDropHookArg | ( | classId, | ||
| objectId, | ||||
| subId, | ||||
| dropflags | ||||
| ) |
do { \ if (object_access_hook) \ RunObjectDropHook((classId),(objectId),(subId), \ (dropflags)); \ } while(0)
Definition at line 158 of file objectaccess.h.
Referenced by deleteOneObject().
| #define InvokeObjectPostAlterHook | ( | classId, | ||
| objectId, | ||||
| subId | ||||
| ) |
InvokeObjectPostAlterHookArg((classId),(objectId),(subId), \ InvalidOid,false)
Definition at line 165 of file objectaccess.h.
Referenced by AlterConstraintNamespaces(), AlterDatabase(), AlterDatabaseOwner(), AlterDomainDefault(), AlterDomainNotNull(), AlterDomainValidateConstraint(), AlterEnum(), AlterEventTrigger(), AlterEventTriggerOwner_internal(), AlterExtensionNamespace(), AlterForeignDataWrapper(), AlterForeignDataWrapperOwner_internal(), AlterForeignServer(), AlterForeignServerOwner_internal(), AlterFunction(), AlterObjectNamespace_internal(), AlterObjectOwner_internal(), AlterObjectRename_internal(), AlterRelationNamespaceInternal(), AlterRole(), AlterSchemaOwner_internal(), AlterSequence(), AlterTableSpaceOptions(), AlterTSConfiguration(), AlterTSDictionary(), AlterTypeNamespaceInternal(), AlterTypeOwner(), AlterTypeOwnerInternal(), ApplyExtensionUpdates(), ATExecAddOf(), ATExecAlterColumnGenericOptions(), ATExecAlterColumnType(), ATExecChangeOwner(), ATExecDropNotNull(), ATExecDropOf(), ATExecGenericOptions(), ATExecSetNotNull(), ATExecSetOptions(), ATExecSetRelOptions(), ATExecSetStatistics(), ATExecSetStorage(), ATExecSetTableSpace(), ATExecValidateConstraint(), EnableDisableRule(), EnableDisableTrigger(), ExecAlterExtensionContentsStmt(), movedb(), renameatt_internal(), RenameConstraintById(), RenameDatabase(), RenameRole(), RenameSchema(), RenameTableSpace(), renametrig(), RenameTypeInternal(), and SetDefaultACL().
| #define InvokeObjectPostAlterHookArg | ( | classId, | ||
| objectId, | ||||
| subId, | ||||
| auxiliaryId, | ||||
| is_internal | ||||
| ) |
do { \ if (object_access_hook) \ RunObjectPostAlterHook((classId),(objectId),(subId), \ (auxiliaryId),(is_internal)); \ } while(0)
Definition at line 169 of file objectaccess.h.
Referenced by AlterSetting(), ATExecDropInherit(), ATExecSetRelOptions(), index_constraint_create(), mark_index_clustered(), RenameRelationInternal(), StoreCatalogInheritance1(), and swap_relation_files().
| #define InvokeObjectPostCreateHook | ( | classId, | ||
| objectId, | ||||
| subId | ||||
| ) | InvokeObjectPostCreateHookArg((classId),(objectId),(subId),false) |
Definition at line 147 of file objectaccess.h.
Referenced by ATExecAddColumn(), CollationCreate(), ConversionCreate(), create_proc_lang(), CreateCast(), createdb(), CreateForeignDataWrapper(), CreateForeignServer(), CreateOpFamily(), CreateRole(), CreateTableSpace(), CreateUserMapping(), DefineOpClass(), DefineTSConfiguration(), DefineTSDictionary(), DefineTSParser(), DefineTSTemplate(), insert_event_trigger_tuple(), InsertExtensionTuple(), InsertRule(), inv_create(), NamespaceCreate(), OperatorCreate(), OperatorShellMake(), ProcedureCreate(), SetDefaultACL(), storeOperators(), storeProcedures(), TypeCreate(), and TypeShellMake().
| #define InvokeObjectPostCreateHookArg | ( | classId, | ||
| objectId, | ||||
| subId, | ||||
| is_internal | ||||
| ) |
do { \ if (object_access_hook) \ RunObjectPostCreateHook((classId),(objectId),(subId), \ (is_internal)); \ } while(0)
Definition at line 149 of file objectaccess.h.
Referenced by CreateConstraintEntry(), CreateTrigger(), heap_create_with_catalog(), index_create(), and StoreAttrDefault().
| typedef void(* object_access_hook_type)(ObjectAccessType access, Oid classId, Oid objectId, int subId, void *arg) |
Definition at line 122 of file objectaccess.h.
| typedef enum ObjectAccessType ObjectAccessType |
| enum ObjectAccessType |
Definition at line 42 of file objectaccess.h.
{
OAT_POST_CREATE,
OAT_DROP,
OAT_POST_ALTER,
OAT_NAMESPACE_SEARCH,
OAT_FUNCTION_EXECUTE,
} ObjectAccessType;
| void RunFunctionExecuteHook | ( | Oid | objectId | ) |
Definition at line 120 of file objectaccess.c.
References Assert, NULL, and object_access_hook.
{
/* caller should check, but just in case... */
Assert(object_access_hook != NULL);
(*object_access_hook)(OAT_FUNCTION_EXECUTE,
ProcedureRelationId, objectId, 0,
NULL);
}
Definition at line 96 of file objectaccess.c.
References Assert, ObjectAccessNamespaceSearch::ereport_on_violation, NULL, object_access_hook, and ObjectAccessNamespaceSearch::result.
{
ObjectAccessNamespaceSearch ns_arg;
/* caller should check, but just in case... */
Assert(object_access_hook != NULL);
memset(&ns_arg, 0, sizeof(ObjectAccessNamespaceSearch));
ns_arg.ereport_on_violation = ereport_on_violation;
ns_arg.result = true;
(*object_access_hook)(OAT_NAMESPACE_SEARCH,
NamespaceRelationId, objectId, 0,
(void *) &ns_arg);
return ns_arg.result;
}
Definition at line 51 of file objectaccess.c.
References Assert, ObjectAccessDrop::dropflags, NULL, and object_access_hook.
{
ObjectAccessDrop drop_arg;
/* caller should check, but just in case... */
Assert(object_access_hook != NULL);
memset(&drop_arg, 0, sizeof(ObjectAccessDrop));
drop_arg.dropflags = dropflags;
(*object_access_hook)(OAT_DROP,
classId, objectId, subId,
(void *) &drop_arg);
}
| void RunObjectPostAlterHook | ( | Oid | classId, | |
| Oid | objectId, | |||
| int | subId, | |||
| Oid | auxiliaryId, | |||
| bool | is_internal | |||
| ) |
Definition at line 73 of file objectaccess.c.
References Assert, ObjectAccessPostAlter::auxiliary_id, ObjectAccessPostAlter::is_internal, NULL, and object_access_hook.
{
ObjectAccessPostAlter pa_arg;
/* caller should check, but just in case... */
Assert(object_access_hook != NULL);
memset(&pa_arg, 0, sizeof(ObjectAccessPostAlter));
pa_arg.auxiliary_id = auxiliaryId;
pa_arg.is_internal = is_internal;
(*object_access_hook)(OAT_POST_ALTER,
classId, objectId, subId,
(void *) &pa_arg);
}
Definition at line 29 of file objectaccess.c.
References Assert, ObjectAccessPostCreate::is_internal, NULL, and object_access_hook.
{
ObjectAccessPostCreate pc_arg;
/* caller should check, but just in case... */
Assert(object_access_hook != NULL);
memset(&pc_arg, 0, sizeof(ObjectAccessPostCreate));
pc_arg.is_internal = is_internal;
(*object_access_hook)(OAT_POST_CREATE,
classId, objectId, subId,
(void *) &pc_arg);
}
| PGDLLIMPORT object_access_hook_type object_access_hook |
Definition at line 21 of file objectaccess.c.
Referenced by _PG_init(), RunFunctionExecuteHook(), RunNamespaceSearchHook(), RunObjectDropHook(), RunObjectPostAlterHook(), and RunObjectPostCreateHook().
1.7.1