Skip to content

Commit 7e487c1

Browse files
committed
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.
1 parent d08fd1f commit 7e487c1

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

doc/src/sgml/ref/create_view.sgml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,12 @@ CREATE [ OR REPLACE ] [ TEMP | TEMPORARY ] VIEW <replaceable class="PARAMETER">n
117117
<para>
118118
Currently, views are read only: the system will not allow an insert,
119119
update, or delete on a view. You can get the effect of an updatable
120-
view by creating rules that rewrite inserts, etc. on the view into
120+
view by creating <literal>INSTEAD</> triggers on the view, which
121+
must convert attempted inserts, etc. on the view into
121122
appropriate actions on other tables. For more information see
122-
<xref linkend="sql-createrule">.
123+
<xref linkend="sql-createtrigger">. Another possibility is to create
124+
rules (see <xref linkend="sql-createrule">), but in practice triggers
125+
are easier to understand and use correctly.
123126
</para>
124127

125128
<para>

0 commit comments

Comments
 (0)