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