aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/init/globals.c
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2010-11-25 11:48:49 -0500
committerRobert Haas <rhaas@postgresql.org>2010-11-25 11:50:13 -0500
commitcc1ed40d57aa68322e43a7b0a3320a6c5aff010a (patch)
tree9ea4ae8d86ab1e9709e16357a05040700acbe02a /src/backend/utils/init/globals.c
parentd3c126544342728ab4b5c167b4f4b01a39270db5 (diff)
downloadpostgresql-cc1ed40d57aa68322e43a7b0a3320a6c5aff010a.tar.gz
postgresql-cc1ed40d57aa68322e43a7b0a3320a6c5aff010a.zip
Object access hook framework, with post-creation hook.
After a SQL object is created, we provide an opportunity for security or logging plugins to get control; for example, a security label provider could use this to assign an initial security label to newly created objects. The basic infrastructure is (hopefully) reusable for other types of events that might require similar treatment. KaiGai Kohei, with minor adjustments.
Diffstat (limited to 'src/backend/utils/init/globals.c')
-rw-r--r--src/backend/utils/init/globals.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/backend/utils/init/globals.c b/src/backend/utils/init/globals.c
index 9aa2c0a498f..5855fe46663 100644
--- a/src/backend/utils/init/globals.c
+++ b/src/backend/utils/init/globals.c
@@ -18,6 +18,7 @@
*/
#include "postgres.h"
+#include "catalog/objectaccess.h"
#include "libpq/pqcomm.h"
#include "miscadmin.h"
#include "storage/backendid.h"
@@ -117,3 +118,9 @@ int VacuumCostBalance = 0; /* working state for vacuum */
bool VacuumCostActive = false;
int GinFuzzySearchLimit = 0;
+
+/*
+ * Hook on object accesses. This is intended as infrastructure for security
+ * and logging plugins.
+ */
+PGDLLIMPORT object_access_hook_type object_access_hook = NULL;