1
0
mirror of https://github.com/postgres/postgres.git synced 2025-04-22 23:02:54 +03:00

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.
This commit is contained in:
Tom Lane 2012-12-02 16:17:53 -05:00
parent 5457a130d3
commit d8262b6c9b

View File

@ -130,9 +130,12 @@ CREATE [ OR REPLACE ] [ TEMP | TEMPORARY ] VIEW <replaceable class="PARAMETER">n
<para> <para>
Currently, views are read only: the system will not allow an insert, 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 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 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>
<para> <para>