From d8262b6c9b9dabee397b30f9af3c01d17e8eced8 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sun, 2 Dec 2012 16:17:53 -0500 Subject: [PATCH] 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 838bf486a3..9e3bc2954f 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 n 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 INSTEAD triggers on the view, which + must convert attempted inserts, etc. on the view into appropriate actions on other tables. For more information see - . + . Another possibility is to create + rules (see ), but in practice triggers + are easier to understand and use correctly.