PostgreSQL Source Code
git master
|
Go to the source code of this file.
Data Structures | |
struct | ObjectAccessPostCreate |
struct | ObjectAccessDrop |
struct | ObjectAccessPostAlter |
struct | ObjectAccessNamespaceSearch |
Macros | |
#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 | InvokeObjectTruncateHook(objectId) |
#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, OAT_TRUNCATE } |
Functions | |
void | RunObjectPostCreateHook (Oid classId, Oid objectId, int subId, bool is_internal) |
void | RunObjectDropHook (Oid classId, Oid objectId, int subId, int dropflags) |
void | RunObjectTruncateHook (Oid objectId) |
void | RunObjectPostAlterHook (Oid classId, Oid objectId, int subId, Oid auxiliaryId, bool is_internal) |
bool | RunNamespaceSearchHook (Oid objectId, bool ereport_on_violation) |
void | RunFunctionExecuteHook (Oid objectId) |
Variables | |
PGDLLIMPORT object_access_hook_type | object_access_hook |
#define InvokeFunctionExecuteHook | ( | objectId | ) |
Definition at line 191 of file objectaccess.h.
Referenced by call_pltcl_start_proc(), ExecBuildGroupingEqual(), ExecInitAgg(), ExecInitExprRec(), ExecInitFunc(), ExecInitWindowAgg(), ExecuteCallStmt(), HandleFunctionRequest(), init_sexpr(), and initialize_peragg().
#define InvokeNamespaceSearchHook | ( | objectId, | |
ereport_on_violation | |||
) |
Definition at line 186 of file objectaccess.h.
Referenced by HandleFunctionRequest(), LookupExplicitNamespace(), LookupNamespaceNoError(), and recomputeNamespacePath().
#define InvokeObjectDropHook | ( | classId, | |
objectId, | |||
subId | |||
) | InvokeObjectDropHookArg((classId),(objectId),(subId),0) |
Definition at line 160 of file objectaccess.h.
Referenced by dropdb(), DropRole(), DropSubscription(), and DropTableSpace().
#define InvokeObjectDropHookArg | ( | classId, | |
objectId, | |||
subId, | |||
dropflags | |||
) |
Definition at line 162 of file objectaccess.h.
Referenced by deleteOneObject().
#define InvokeObjectPostAlterHook | ( | classId, | |
objectId, | |||
subId | |||
) |
Definition at line 175 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(), AlterOperator(), AlterPolicy(), AlterPublicationOptions(), AlterPublicationOwner_internal(), AlterRelationNamespaceInternal(), AlterRole(), AlterSchemaOwner_internal(), AlterSequence(), AlterStatistics(), AlterSubscription(), AlterSubscriptionOwner_internal(), AlterTableSpaceOptions(), AlterTSConfiguration(), AlterTSDictionary(), AlterTypeNamespaceInternal(), AlterTypeOwner_oid(), AlterTypeRecurse(), AlterUserMapping(), ApplyExtensionUpdates(), ATExecAddIdentity(), ATExecAddOf(), ATExecAlterColumnGenericOptions(), ATExecAlterColumnType(), ATExecAlterConstraint(), ATExecChangeOwner(), ATExecDropExpression(), ATExecDropIdentity(), ATExecDropNotNull(), ATExecDropOf(), ATExecGenericOptions(), ATExecSetIdentity(), ATExecSetNotNull(), ATExecSetOptions(), ATExecSetRelOptions(), ATExecSetStatistics(), ATExecSetStorage(), ATExecSetTableSpace(), ATExecSetTableSpaceNoStorage(), ATExecValidateConstraint(), EnableDisableRule(), EnableDisableTrigger(), ExecAlterExtensionContentsStmt(), movedb(), RemoveRoleFromObjectPolicy(), rename_policy(), renameatt_internal(), RenameConstraintById(), RenameDatabase(), RenameRewriteRule(), RenameRole(), RenameSchema(), RenameTableSpace(), renametrig(), RenameTypeInternal(), and SetDefaultACL().
#define InvokeObjectPostAlterHookArg | ( | classId, | |
objectId, | |||
subId, | |||
auxiliaryId, | |||
is_internal | |||
) |
Definition at line 178 of file objectaccess.h.
Referenced by AlterSetting(), ATExecSetRelOptions(), index_constraint_create(), mark_index_clustered(), relation_mark_replica_identity(), RemoveInheritance(), RenameRelationInternal(), StoreCatalogInheritance1(), and swap_relation_files().
#define InvokeObjectPostCreateHook | ( | classId, | |
objectId, | |||
subId | |||
) | InvokeObjectPostCreateHookArg((classId),(objectId),(subId),false) |
Definition at line 151 of file objectaccess.h.
Referenced by ATExecAddColumn(), CastCreate(), CollationCreate(), ConversionCreate(), CreateAccessMethod(), createdb(), CreateForeignDataWrapper(), CreateForeignServer(), CreateOpFamily(), CreatePolicy(), CreateProceduralLanguage(), CreatePublication(), CreateRole(), CreateStatistics(), CreateSubscription(), CreateTableSpace(), CreateTransform(), CreateUserMapping(), DefineOpClass(), DefineTSConfiguration(), DefineTSDictionary(), DefineTSParser(), DefineTSTemplate(), insert_event_trigger_tuple(), InsertExtensionTuple(), InsertRule(), inv_create(), NamespaceCreate(), OperatorCreate(), OperatorShellMake(), ProcedureCreate(), PublicationAddTables(), SetDefaultACL(), storeOperators(), storeProcedures(), TypeCreate(), and TypeShellMake().
#define InvokeObjectPostCreateHookArg | ( | classId, | |
objectId, | |||
subId, | |||
is_internal | |||
) |
Definition at line 153 of file objectaccess.h.
Referenced by CreateConstraintEntry(), CreateTrigger(), heap_create_with_catalog(), index_create(), and StoreAttrDefault().
#define InvokeObjectTruncateHook | ( | objectId | ) |
Definition at line 169 of file objectaccess.h.
Referenced by truncate_check_rel().
typedef void(* object_access_hook_type) (ObjectAccessType access, Oid classId, Oid objectId, int subId, void *arg) |
Definition at line 125 of file objectaccess.h.
typedef enum ObjectAccessType ObjectAccessType |
enum ObjectAccessType |
Enumerator | |
---|---|
OAT_POST_CREATE | |
OAT_DROP | |
OAT_POST_ALTER | |
OAT_NAMESPACE_SEARCH | |
OAT_FUNCTION_EXECUTE | |
OAT_TRUNCATE |
Definition at line 46 of file objectaccess.h.
void RunFunctionExecuteHook | ( | Oid | objectId | ) |
Definition at line 137 of file objectaccess.c.
References Assert, OAT_FUNCTION_EXECUTE, and object_access_hook.
Definition at line 113 of file objectaccess.c.
References Assert, ObjectAccessNamespaceSearch::ereport_on_violation, OAT_NAMESPACE_SEARCH, object_access_hook, and ObjectAccessNamespaceSearch::result.
Definition at line 52 of file objectaccess.c.
References Assert, ObjectAccessDrop::dropflags, OAT_DROP, and object_access_hook.
void RunObjectPostAlterHook | ( | Oid | classId, |
Oid | objectId, | ||
int | subId, | ||
Oid | auxiliaryId, | ||
bool | is_internal | ||
) |
Definition at line 90 of file objectaccess.c.
References Assert, ObjectAccessPostAlter::auxiliary_id, ObjectAccessPostAlter::is_internal, OAT_POST_ALTER, and object_access_hook.
Definition at line 30 of file objectaccess.c.
References Assert, ObjectAccessPostCreate::is_internal, OAT_POST_CREATE, and object_access_hook.
void RunObjectTruncateHook | ( | Oid | objectId | ) |
Definition at line 74 of file objectaccess.c.
References Assert, OAT_TRUNCATE, and object_access_hook.
PGDLLIMPORT object_access_hook_type object_access_hook |
Definition at line 22 of file objectaccess.c.
Referenced by _PG_init(), RunFunctionExecuteHook(), RunNamespaceSearchHook(), RunObjectDropHook(), RunObjectPostAlterHook(), RunObjectPostCreateHook(), and RunObjectTruncateHook().