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

Commit2a08204

Browse files
committed
Update man page to prefer old over current.
1 parent52f77df commit2a08204

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

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

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_rule.sgml,v 1.14 2000/04/07 19:17:30 momjian Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_rule.sgml,v 1.15 2000/04/12 20:07:13 momjian Exp $
33
Postgres documentation
44
-->
55

@@ -71,7 +71,7 @@ CREATE RULE <replaceable class="parameter">name</replaceable> AS ON <replaceable
7171
<listitem>
7272
<para>
7373
Any SQL WHERE clause, <literal>new</literal> or
74-
<literal>current</literal> can appear instead of an instance
74+
<literal>old</literal> can appear instead of an instance
7575
variable whenever an instance variable is permissible in SQL.
7676
</para>
7777
</listitem>
@@ -81,7 +81,7 @@ CREATE RULE <replaceable class="parameter">name</replaceable> AS ON <replaceable
8181
<listitem>
8282
<para>
8383
Any SQL statement, <literal>new</literal> or
84-
<literal>current</literal> can appear instead of an instance
84+
<literal>old</literal> can appear instead of an instance
8585
variable whenever an instance variable is permissible in SQL.
8686
</para>
8787
</listitem>
@@ -133,17 +133,17 @@ CREATE
133133

134134
<para>
135135
The semantics of a rule is that at the time an individual instance is
136-
accessed, inserted, updated, or deleted, there is acurrent instance (for
136+
accessed, inserted, updated, or deleted, there is aold instance (for
137137
selects, updates and deletes) and a new instance (for inserts and
138138
updates).
139139
If the <replaceable class="parameter">event</replaceable>
140140
specified in the ON clause and the
141141
<replaceable class="parameter">condition</replaceable> specified in the
142-
WHERE clause are true for thecurrent instance, the
142+
WHERE clause are true for theold instance, the
143143
<replaceable class="parameter">action</replaceable> part of the rule is
144-
executed. First, however, values from fields in thecurrent instance
144+
executed. First, however, values from fields in theold instance
145145
and/or the new instance are substituted for
146-
<literal>current.</literal><replaceable class="parameter">attribute-name</replaceable>
146+
<literal>old.</literal><replaceable class="parameter">attribute-name</replaceable>
147147
and <literal>new.</literal><replaceable class="parameter">attribute-name</replaceable>.
148148
</para>
149149

@@ -167,7 +167,7 @@ CREATE
167167
<replaceable class="parameter">condition</replaceable> and
168168
<replaceable class="parameter">action</replaceable> parts of a rule,
169169
they are all considered different tuple variables. More accurately,
170-
<literal>new</literal> and <literal>current</literal> are the only tuple
170+
<literal>new</literal> and <literal>old</literal> are the only tuple
171171
variables that are shared between these clauses. For example, the following
172172
two rules have the same semantics:
173173
<programlisting>
@@ -263,15 +263,15 @@ SELECT * FROM emp;
263263

264264
<programlisting>
265265
CREATE RULE example_1 AS
266-
ON UPDATE emp.salary WHEREcurrent.name = "Joe"
266+
ON UPDATE emp.salary WHEREold.name = "Joe"
267267
DO
268268
UPDATE emp
269269
SET salary = new.salary
270270
WHERE emp.name = "Sam";
271271
</programlisting>
272272

273273
At the time Joe receives a salary adjustment, the event
274-
will become true and Joe'scurrent instance and proposed
274+
will become true and Joe'sold instance and proposed
275275
new instance are available to the execution routines.
276276
Hence, his new salary is substituted into the action part
277277
of the rule which is subsequently executed. This propagates
@@ -282,7 +282,7 @@ CREATE RULE example_1 AS
282282
<programlisting>
283283
CREATE RULE example_2 AS
284284
ON SELECT TO EMP.salary
285-
WHEREcurrent.name = "Bill"
285+
WHEREold.name = "Bill"
286286
DO INSTEAD
287287
SELECT emp.salary
288288
FROM emp
@@ -297,7 +297,7 @@ CREATE RULE example_2 AS
297297
CREATE RULE example_3 AS
298298
ON
299299
SELECT TO emp.salary
300-
WHEREcurrent.dept = "shoe" AND current_user = "Joe"
300+
WHEREold.dept = "shoe" AND current_user = "Joe"
301301
DO INSTEAD NOTHING;
302302
</programlisting>
303303
</para>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp