Expand description
PostgreSQL 18 automatically updatable view analysis and DML rewriting.
Re-exports§
pub use rule_inputs::rule_input_requirements;pub use rule_inputs::validate_grouped_rule_inputs;pub use crate::catalog::view::ViewMutationCapabilities;
Modules§
- context
- Catalog and authorization inputs for automatic view analysis and DML rewriting.
- rule_
inputs - Surviving input dependencies across automatic views and rewrite rules.
Structs§
Enums§
- Merge
View Target Path - NotUpdatable
Reason - Why a view cannot be rewritten onto its base relation.
RewriteQuerytests conditionalINSTEADrules first, andview_query_is_auto_updatabletests the rest in the order listed. - View
Check Option - View
Query Shape - What
view_query_is_auto_updatablefinds in a view’s own query, short of its test for an updatable column, which depends on the command.
Functions§
- automatic_
view_ layer - has_
instead_ of_ trigger - merge_
view_ target_ path - Choose how a MERGE reaches view
plan.target, asRewriteQueryandrewriteTargetViewdo: through the view’s INSTEAD OF triggers when every action has one, and otherwise by rewriting the view onto its base relation, which its query must allow, with an updatable column when an action inserts or updates. When it does not, the first action in WHEN order without a trigger reports why; an automatically updatable view cannot mix the two paths. - relation_
columns - rewrite_
delete_ to_ base - rewrite_
insert_ to_ base - rewrite_
merge_ to_ base - rewrite_
update_ to_ base - validate_
public_ merge_ contract - validate_
public_ merge_ targets - validate_
view_ definition_ check_ option - view_
query_ shape - The shape of the query of view
name, orNonewhennamenames no regular view. - view_
updatability