mirror of
https://github.com/postgres/postgres.git
synced 2025-09-02 04:21:28 +03:00
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
This commit is contained in:
@@ -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 */
|
||||
|
Reference in New Issue
Block a user