6
* Portions Copyright (c) 1996-2011, PostgreSQL Global Development Group
7
* Portions Copyright (c) 1994, Regents of the University of California
10
#ifndef OBJECTACCESS_H
11
#define OBJECTACCESS_H
14
* Object access hooks are intended to be called just before or just after
15
* performing certain actions on a SQL object. This is intended as
16
* infrastructure for security or logging pluggins.
18
* OAT_POST_CREATE should be invoked just after the the object is created.
19
* Typically, this is done after inserting the primary catalog records and
20
* associated dependencies.
22
* Other types may be added in the future.
24
typedef enum ObjectAccessType
30
* Hook, and a macro to invoke it.
33
typedef void (*object_access_hook_type) (ObjectAccessType access,
38
extern PGDLLIMPORT object_access_hook_type object_access_hook;
40
#define InvokeObjectAccessHook(access,classId,objectId,subId) \
42
if (object_access_hook) \
43
(*object_access_hook)((access),(classId),(objectId),(subId)); \
46
#endif /* OBJECTACCESS_H */