10 #ifndef OBJECTACCESS_H
11 #define OBJECTACCESS_H
135 const char *objectStr,
151 Oid auxiliaryId,
bool is_internal);
162 Oid auxiliaryId,
bool is_internal);
173 #define InvokeObjectPostCreateHook(classId,objectId,subId) \
174 InvokeObjectPostCreateHookArg((classId),(objectId),(subId),false)
175 #define InvokeObjectPostCreateHookArg(classId,objectId,subId,is_internal) \
177 if (object_access_hook) \
178 RunObjectPostCreateHook((classId),(objectId),(subId), \
182 #define InvokeObjectDropHook(classId,objectId,subId) \
183 InvokeObjectDropHookArg((classId),(objectId),(subId),0)
184 #define InvokeObjectDropHookArg(classId,objectId,subId,dropflags) \
186 if (object_access_hook) \
187 RunObjectDropHook((classId),(objectId),(subId), \
191 #define InvokeObjectTruncateHook(objectId) \
193 if (object_access_hook) \
194 RunObjectTruncateHook(objectId); \
197 #define InvokeObjectPostAlterHook(classId,objectId,subId) \
198 InvokeObjectPostAlterHookArg((classId),(objectId),(subId), \
200 #define InvokeObjectPostAlterHookArg(classId,objectId,subId, \
201 auxiliaryId,is_internal) \
203 if (object_access_hook) \
204 RunObjectPostAlterHook((classId),(objectId),(subId), \
205 (auxiliaryId),(is_internal)); \
208 #define InvokeNamespaceSearchHook(objectId, ereport_on_violation) \
209 (!object_access_hook \
211 : RunNamespaceSearchHook((objectId), (ereport_on_violation)))
213 #define InvokeFunctionExecuteHook(objectId) \
215 if (object_access_hook) \
216 RunFunctionExecuteHook(objectId); \
220 #define InvokeObjectPostCreateHookStr(classId,objectName,subId) \
221 InvokeObjectPostCreateHookArgStr((classId),(objectName),(subId),false)
222 #define InvokeObjectPostCreateHookArgStr(classId,objectName,subId,is_internal) \
224 if (object_access_hook_str) \
225 RunObjectPostCreateHookStr((classId),(objectName),(subId), \
229 #define InvokeObjectDropHookStr(classId,objectName,subId) \
230 InvokeObjectDropHookArgStr((classId),(objectName),(subId),0)
231 #define InvokeObjectDropHookArgStr(classId,objectName,subId,dropflags) \
233 if (object_access_hook_str) \
234 RunObjectDropHookStr((classId),(objectName),(subId), \
238 #define InvokeObjectTruncateHookStr(objectName) \
240 if (object_access_hook_str) \
241 RunObjectTruncateHookStr(objectName); \
244 #define InvokeObjectPostAlterHookStr(classId,objectName,subId) \
245 InvokeObjectPostAlterHookArgStr((classId),(objectName),(subId), \
247 #define InvokeObjectPostAlterHookArgStr(classId,objectName,subId, \
248 auxiliaryId,is_internal) \
250 if (object_access_hook_str) \
251 RunObjectPostAlterHookStr((classId),(objectName),(subId), \
252 (auxiliaryId),(is_internal)); \
255 #define InvokeNamespaceSearchHookStr(objectName, ereport_on_violation) \
256 (!object_access_hook_str \
258 : RunNamespaceSearchHookStr((objectName), (ereport_on_violation)))
260 #define InvokeFunctionExecuteHookStr(objectName) \
262 if (object_access_hook_str) \
263 RunFunctionExecuteHookStr(objectName); \
void RunObjectTruncateHookStr(const char *objectName)
void RunFunctionExecuteHookStr(const char *objectName)
void RunObjectDropHook(Oid classId, Oid objectId, int subId, int dropflags)
void RunObjectPostAlterHook(Oid classId, Oid objectId, int subId, Oid auxiliaryId, bool is_internal)
void RunFunctionExecuteHook(Oid objectId)
bool RunNamespaceSearchHook(Oid objectId, bool ereport_on_violation)
void(* object_access_hook_type)(ObjectAccessType access, Oid classId, Oid objectId, int subId, void *arg)
void RunObjectPostCreateHookStr(Oid classId, const char *objectName, int subId, bool is_internal)
PGDLLIMPORT object_access_hook_type object_access_hook
void(* object_access_hook_type_str)(ObjectAccessType access, Oid classId, const char *objectStr, int subId, void *arg)
void RunObjectTruncateHook(Oid objectId)
void RunObjectPostAlterHookStr(Oid classId, const char *objectName, int subId, Oid auxiliaryId, bool is_internal)
void RunObjectPostCreateHook(Oid classId, Oid objectId, int subId, bool is_internal)
void RunObjectDropHookStr(Oid classId, const char *objectName, int subId, int dropflags)
bool RunNamespaceSearchHookStr(const char *objectName, bool ereport_on_violation)
PGDLLIMPORT object_access_hook_type_str object_access_hook_str
bool ereport_on_violation