1
0
mirror of https://github.com/postgres/postgres.git synced 2025-09-03 15:22:11 +03:00

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.
This commit is contained in:
Robert Haas
2010-11-25 11:48:49 -05:00
parent d3c1265443
commit cc1ed40d57
21 changed files with 167 additions and 0 deletions

View File

@@ -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;