1- <!-- $PostgreSQL: pgsql/doc/src/sgml/rules.sgml,v 1.33 2003/12/13 23:59:06 neilc Exp $ -->
1+ <!-- $PostgreSQL: pgsql/doc/src/sgml/rules.sgml,v 1.34 2004/03/09 05:05:40 momjian Exp $ -->
22
33<Chapter Id="rules">
44<Title>The Rule System</Title>
@@ -873,7 +873,7 @@ SELECT t1.a, t2.b, t1.ctid FROM t1, t2 WHERE t1.a = t2.a;
873873
874874 <ListItem>
875875<Para>
876- They can be <literal>INSTEAD</> ornot .
876+ They can be <literal>INSTEAD</> or<literal>ALSO</> (default) .
877877</Para>
878878</ListItem>
879879
@@ -904,7 +904,7 @@ SELECT t1.a, t2.b, t1.ctid FROM t1, t2 WHERE t1.a = t2.a;
904904<ProgramListing>
905905CREATE RULE <replaceable>rule_name</> AS ON <replaceable>event</>
906906 TO <replaceable>object</> [WHERE <replaceable>rule_qualification</>]
907- DO [INSTEAD] [<replaceable>action</> | (<replaceable>actions</>) | NOTHING];
907+ DO [ALSO| INSTEAD] [<replaceable>action</> | (<replaceable>actions</>) | NOTHING];
908908</ProgramListing>
909909
910910 in mind.
@@ -920,7 +920,7 @@ CREATE RULE <replaceable>rule_name</> AS ON <replaceable>event</>
920920 Initially the query-tree list is empty.
921921 There can be zero (<literal>NOTHING</> key word), one, or multiple actions.
922922 To simplify, we will look at a rule with one action. This rule
923- can have a qualification or not and it can be <literal>INSTEAD</> ornot .
923+ can have a qualification or not and it can be <literal>INSTEAD</> or<literal>ALSO</> (default) .
924924</Para>
925925
926926<Para>
@@ -937,7 +937,7 @@ CREATE RULE <replaceable>rule_name</> AS ON <replaceable>event</>
937937
938938 <variablelist>
939939 <varlistentry>
940- <term>No qualification andnot <literal>INSTEAD </></term>
940+ <term>No qualification and <literal>ALSO </></term>
941941 <listitem>
942942 <para>
943943 the query tree from the rule action with the original query
@@ -957,7 +957,7 @@ CREATE RULE <replaceable>rule_name</> AS ON <replaceable>event</>
957957 </varlistentry>
958958
959959 <varlistentry>
960- <term>Qualification given andnot <literal>INSTEAD </></term>
960+ <term>Qualification given and <literal>ALSO </></term>
961961 <listitem>
962962 <para>
963963 the query tree from the rule action with the rule
@@ -980,7 +980,7 @@ CREATE RULE <replaceable>rule_name</> AS ON <replaceable>event</>
980980 </varlistentry>
981981 </variablelist>
982982
983- Finally, if the rule isnot <literal>INSTEAD </>, the unchanged original query tree is
983+ Finally, if the rule is <literal>ALSO </>, the unchanged original query tree is
984984 added to the list. Since only qualified <literal>INSTEAD</> rules already add the
985985 original query tree, we end up with either one or two output query trees
986986 for a rule with one action.
@@ -1111,7 +1111,7 @@ INSERT INTO shoelace_log VALUES (
11111111</Para>
11121112
11131113<Para>
1114- The rule is a qualifiednon- <literal>INSTEAD </> rule, so the rule system
1114+ The rule is a qualified <literal>ALSO </> rule, so the rule system
11151115 has to return two query trees: the modified rule action and the original
11161116 query tree. In step 1, the range table of the original query is
11171117 incorporated into the rule's action query tree. This results in:
@@ -1190,7 +1190,7 @@ INSERT INTO shoelace_log VALUES (
11901190 </para>
11911191
11921192 <para>
1193- That's it. Since the rule isnot <literal>INSTEAD </>, we also output the
1193+ That's it. Since the rule is <literal>ALSO </>, we also output the
11941194 original query tree. In short, the output from the rule system
11951195 is a list of two query trees that correspond to these statements:
11961196