summaryrefslogtreecommitdiff
path: root/src/include/rewrite
diff options
context:
space:
mode:
authorStephen Frost <sfrost@snowman.net>2013-07-18 17:10:16 -0400
committerStephen Frost <sfrost@snowman.net>2013-07-18 17:10:16 -0400
commit4cbe3ac3e86790d05c569de4585e5075a62a9b41 (patch)
tree8adc929520d4103b4493c0c23bcb7d2b2c2a5a4d /src/include/rewrite
parent6f9e39bc9993c18686f0950f9b9657c7c97c7450 (diff)
downloadpostgresql-4cbe3ac3e86790d05c569de4585e5075a62a9b41.tar.gz
WITH CHECK OPTION support for auto-updatable VIEWs
For simple views which are automatically updatable, this patch allows the user to specify what level of checking should be done on records being inserted or updated. For 'LOCAL CHECK', new tuples are validated against the conditionals of the view they are being inserted into, while for 'CASCADED CHECK' the new tuples are validated against the conditionals for all views involved (from the top down). This option is part of the SQL specification. Dean Rasheed, reviewed by Pavel Stehule
Diffstat (limited to 'src/include/rewrite')
-rw-r--r--src/include/rewrite/rewriteHandler.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/include/rewrite/rewriteHandler.h b/src/include/rewrite/rewriteHandler.h
index 1831de4640..f0604b0dc8 100644
--- a/src/include/rewrite/rewriteHandler.h
+++ b/src/include/rewrite/rewriteHandler.h
@@ -21,6 +21,10 @@ extern List *QueryRewrite(Query *parsetree);
extern void AcquireRewriteLocks(Query *parsetree, bool forUpdatePushedDown);
extern Node *build_column_default(Relation rel, int attrno);
+extern Query *get_view_query(Relation view);
+extern const char *view_is_auto_updatable(Relation view);
+extern const char *view_query_is_auto_updatable(Query *viewquery,
+ bool security_barrier);
extern int relation_is_updatable(Oid reloid, bool include_triggers);
#endif /* REWRITEHANDLER_H */