commit ec9a8047815276f9119dbb9fda409fef62c72de7 Author: David G. Johnston Date: Fri Oct 2 20:31:02 2020 +0000 doc: Introduce view updating options more succinctly diff --git a/doc/src/sgml/rules.sgml b/doc/src/sgml/rules.sgml index bcf860b68b..431f44a248 100644 --- a/doc/src/sgml/rules.sgml +++ b/doc/src/sgml/rules.sgml @@ -797,6 +797,10 @@ SELECT t1.a, t2.b, t1.ctid FROM t1, t2 WHERE t1.a = t2.a; relation points at a subquery range-table entry, which will not work. There are several ways in which PostgreSQL can support the appearance of updating a view, however. + In order of user-experienced complexity those are: automatically substitute + in the underlying table for the view, execute a user-defined trigger, + or rewrite the query per a user-defined rule. + These options are discussed below. @@ -812,7 +816,8 @@ SELECT t1.a, t2.b, t1.ctid FROM t1, t2 WHERE t1.a = t2.a; Alternatively, the operation may be handled by a user-provided - INSTEAD OF trigger on the view. + INSTEAD OF trigger on the view + (see ). Rewriting works slightly differently in this case. For INSERT, the rewriter does nothing at all with the view, leaving it as the result relation