summaryrefslogtreecommitdiff
path: root/src/include/catalog/objectaccess.h
diff options
context:
space:
mode:
authorAlvaro Herrera <alvherre@alvh.no-ip.org>2012-10-23 18:07:26 -0300
committerAlvaro Herrera <alvherre@alvh.no-ip.org>2012-10-23 18:24:24 -0300
commitf4c4335a4aaf5f2ee6e741cdf4f5c8e338d86a2f (patch)
tree5367e466c939f55a3bf9dba7275887b309378b16 /src/include/catalog/objectaccess.h
parent4c9d0901f135d724a9f3cfa4140a5afd44b10f08 (diff)
downloadpostgresql-f4c4335a4aaf5f2ee6e741cdf4f5c8e338d86a2f.tar.gz
Add context info to OAT_POST_CREATE security hook
... and have sepgsql use it to determine whether to check permissions during certain operations. Indexes that are being created as a result of REINDEX, for instance, do not need to have their permissions checked; they were already checked when the index was created. Author: KaiGai Kohei, slightly revised by me
Diffstat (limited to 'src/include/catalog/objectaccess.h')
-rw-r--r--src/include/catalog/objectaccess.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/include/catalog/objectaccess.h b/src/include/catalog/objectaccess.h
index 3b40dbc492..b4b84a64d0 100644
--- a/src/include/catalog/objectaccess.h
+++ b/src/include/catalog/objectaccess.h
@@ -31,6 +31,19 @@ typedef enum ObjectAccessType
} ObjectAccessType;
/*
+ * Arguments of OAT_POST_CREATE event
+ */
+typedef struct
+{
+ /*
+ * This flag informs extensions whether the context of this creation
+ * is invoked by user's operations, or not. E.g, it shall be dealt
+ * as internal stuff on toast tables or indexes due to type changes.
+ */
+ bool is_internal;
+} ObjectAccessPostCreate;
+
+/*
* Arguments of OAT_DROP event
*/
typedef struct