Skip to content

Commit d8262b6

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 5457a13 commit d8262b6

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
@@ -130,9 +130,12 @@ CREATE [ OR REPLACE ] [ TEMP | TEMPORARY ] VIEW <replaceable class="PARAMETER">n
130130
<para>
131131
Currently, views are read only: the system will not allow an insert,
132132
update, or delete on a view. You can get the effect of an updatable
133-
view by creating rules that rewrite inserts, etc. on the view into
133+
view by creating <literal>INSTEAD</> triggers on the view, which
134+
must convert attempted inserts, etc. on the view into
134135
appropriate actions on other tables. For more information see
135-
<xref linkend="sql-createrule">.
136+
<xref linkend="sql-createtrigger">. Another possibility is to create
137+
rules (see <xref linkend="sql-createrule">), but in practice triggers
138+
are easier to understand and use correctly.
136139
</para>
137140

138141
<para>

0 commit comments

Comments
 (0)