postgres.git / summary / log / commit / refs
commit f7968554ab20e18a78f8e21bda9ff8445f81773f
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: Sun Dec 02 21:17:53 2012 +0000
Recommend triggers, not rules, in the CREATE VIEW reference page.
We've generally recommended use of INSTEAD triggers over rules since that
feature was added; but this old text in the CREATE VIEW reference page
didn't get the memo. Noted by Thomas Kellerer.
doc/src/sgml/ref/create_view.sgml | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/doc/src/sgml/ref/create_view.sgml b/doc/src/sgml/ref/create_view.sgml
index 838bf486a3d..9e3bc2954f2 100644
--- a/doc/src/sgml/ref/create_view.sgml
+++ b/doc/src/sgml/ref/create_view.sgml
@@ -130,9 +130,12 @@ CREATE [ OR REPLACE ] [ TEMP | TEMPORARY ] VIEW <replaceable class="PARAMETER">n
<para>
Currently, views are read only: the system will not allow an insert,
update, or delete on a view. You can get the effect of an updatable
- view by creating rules that rewrite inserts, etc. on the view into
+ view by creating <literal>INSTEAD</> triggers on the view, which
+ must convert attempted inserts, etc. on the view into
appropriate actions on other tables. For more information see
- <xref linkend="sql-createrule">.
+ <xref linkend="sql-createtrigger">. Another possibility is to create
+ rules (see <xref linkend="sql-createrule">), but in practice triggers
+ are easier to understand and use correctly.
</para>
<para>
[parent: aaceb0d6acce]