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

Commitf503b6a

Browse files
committed
Better document INSTEAD behavior for rules.
1 parentf3c6d59 commitf503b6a

File tree

1 file changed

+21
-10
lines changed

1 file changed

+21
-10
lines changed

‎doc/src/sgml/ref/create_rule.sgml

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$PostgreSQL: pgsql/doc/src/sgml/ref/create_rule.sgml,v 1.42 2003/11/29 19:51:38 pgsql Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/ref/create_rule.sgml,v 1.43 2004/03/04 14:32:12 momjian Exp $
33
PostgreSQL documentation
44
-->
55

@@ -42,15 +42,15 @@ CREATE [ OR REPLACE ] RULE <replaceable class="parameter">name</replaceable> AS
4242
define an alternate action to be performed on insertions, updates,
4343
or deletions in database tables. Roughly speaking, a rule causes
4444
additional commands to be executed when a given command on a given
45-
table is executed. Alternatively,a rule can replace a given
46-
command by another, or cause a commandnot to be executed at all.
47-
Rules are used to implement table views as well. It is important
48-
to realize that a rule is reallya command transformation
49-
mechanism, or command macro. Thetransformation happens before the
50-
execution of the commands starts.If you actually want an
51-
operation that fires independently for eachphysical row, you
52-
probably want to use a trigger, not a rule.More information about
53-
the rules system is in <xref linkend="rules">.
45+
table is executed. Alternatively,an <literal>INSTEAD</literal>
46+
rule can replace a givencommand by another, or cause a command
47+
not to be executed at all. Rules are used to implement table
48+
views as well. It is importantto realize that a rule is really
49+
a command transformationmechanism, or command macro. The
50+
transformation happens before theexecution of the commands starts.
51+
If you actually want anoperation that fires independently for each
52+
physical row, youprobably want to use a trigger, not a rule.
53+
More information aboutthe rules system is in <xref linkend="rules">.
5454
</para>
5555

5656
<para>
@@ -140,6 +140,17 @@ CREATE [ OR REPLACE ] RULE <replaceable class="parameter">name</replaceable> AS
140140
</listitem>
141141
</varlistentry>
142142

143+
<varlistentry>
144+
<term><option>INSTEAD</option></term>
145+
<listitem>
146+
<para>
147+
<literal>INSTEAD</literal> indicates that the commands should be
148+
executed <emphasis>instead</> of the original command, not in
149+
addition to the original command.
150+
</para>
151+
</listitem>
152+
</varlistentry>
153+
143154
<varlistentry>
144155
<term><replaceable class="parameter">command</replaceable></term>
145156
<listitem>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp