Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite045565

Browse files
committed
Improve docs on updatable views
Introduce the options before going into details, and add a link to theCREATE TRIGGER documentation.Author: David JohnstonReviewed-By: Anastasia LubennikovaDiscussion:https://postgr.es/m/CAKFQuwYLLRhheo0_Y4Jp=vJ_YDsz1KoRuTpX1A_bUxmHTmLe-A@mail.gmail.com
1 parentf1516ad commite045565

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

‎doc/src/sgml/rules.sgml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -797,6 +797,10 @@ SELECT t1.a, t2.b, t1.ctid FROM t1, t2 WHERE t1.a = t2.a;
797797
relation points at a subquery range-table entry, which will not
798798
work. There are several ways in which <productname>PostgreSQL</productname>
799799
can support the appearance of updating a view, however.
800+
In order of user-experienced complexity those are: automatically substitute
801+
in the underlying table for the view, execute a user-defined trigger,
802+
or rewrite the query per a user-defined rule.
803+
These options are discussed below.
800804
</para>
801805

802806
<para>
@@ -812,7 +816,8 @@ SELECT t1.a, t2.b, t1.ctid FROM t1, t2 WHERE t1.a = t2.a;
812816

813817
<para>
814818
Alternatively, the operation may be handled by a user-provided
815-
<literal>INSTEAD OF</literal> trigger on the view.
819+
<literal>INSTEAD OF</literal> trigger on the view
820+
(see <xref linkend="sql-createtrigger"/>).
816821
Rewriting works slightly differently
817822
in this case. For <command>INSERT</command>, the rewriter does
818823
nothing at all with the view, leaving it as the result relation

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp