postgres.git / summary / log / commit / refs
commit 7e487c1b0acbb26a481e64570dcbfe39b3e54abb
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 417f8c38e7e..77fc6c489c7 100644
--- a/doc/src/sgml/ref/create_view.sgml
+++ b/doc/src/sgml/ref/create_view.sgml
@@ -117,9 +117,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: d08fd1f849ba]