summaryrefslogtreecommitdiff
path: root/src/include/rewrite/rewriteHandler.h
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2013-10-18 10:35:36 -0400
committerRobert Haas <rhaas@postgresql.org>2013-10-18 10:35:36 -0400
commitcab5dc5daf2f6f5da0ce79deb399633b4bb443b5 (patch)
tree03a7cd95ec18a79cbd4d44862df1c9a914da728b /src/include/rewrite/rewriteHandler.h
parent523beaa11bdf6a9864e8978b467ed586b792c9ca (diff)
Allow only some columns of a view to be auto-updateable.
Previously, unless all columns were auto-updateable, we wouldn't inserts, updates, or deletes, or at least not without a rule or trigger; now, we'll allow inserts and updates that target only the auto-updateable columns, and deletes even if there are no auto-updateable columns at all provided the view definition is otherwise suitable. Dean Rasheed, reviewed by Marko Tiikkaja
Diffstat (limited to 'src/include/rewrite/rewriteHandler.h')
-rw-r--r--src/include/rewrite/rewriteHandler.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/include/rewrite/rewriteHandler.h b/src/include/rewrite/rewriteHandler.h
index f0604b0dc88..c9595904522 100644
--- a/src/include/rewrite/rewriteHandler.h
+++ b/src/include/rewrite/rewriteHandler.h
@@ -22,9 +22,11 @@ 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);
+ bool security_barrier,
+ bool check_cols);
+extern int relation_is_updatable(Oid reloid,
+ bool include_triggers,
+ Bitmapset *include_cols);
#endif /* REWRITEHANDLER_H */