Disable brackets in multi-statement rules, as discussed.
authorBruce Momjian <bruce@momjian.us>
Sun, 10 Mar 2002 06:00:15 +0000 (06:00 +0000)
committerBruce Momjian <bruce@momjian.us>
Sun, 10 Mar 2002 06:00:15 +0000 (06:00 +0000)
doc/src/sgml/ref/create_rule.sgml
src/backend/parser/gram.y
src/interfaces/ecpg/preproc/preproc.y

index 0ccbb424d6ec6c877ed81b6b8dbb375b81b5da7a..44b8ae3979987b5d839a45f7b3701eff44a5c99f 100644 (file)
@@ -32,8 +32,6 @@ NOTHING
 <replaceable class="parameter">query</replaceable>
 |
 ( <replaceable class="parameter">query</replaceable> ; <replaceable class="parameter">query</replaceable> ... )
-|
-[ <replaceable class="parameter">query</replaceable> ; <replaceable class="parameter">query</replaceable> ... ]
   </synopsis>
 
   <refsect2 id="R2-SQL-CREATERULE-1">
@@ -177,15 +175,15 @@ CREATE
   </para>
 
   <para>
-   The <replaceable class="parameter">action</replaceable> part of the rule
-   can consist of one or more queries.  To write multiple queries, surround
-   them with either parentheses or square brackets.  Such queries will be
-   performed in the specified order (whereas there are no guarantees about
-   the execution order of multiple rules for an object).  The
-   <replaceable class="parameter">action</replaceable> can also be NOTHING
-   indicating no action.  Thus, a DO INSTEAD NOTHING rule suppresses the
-   original query from executing (when its condition is true); a DO NOTHING
-   rule is useless.
+   The <replaceable class="parameter">action</replaceable> part of the
+   rule can consist of one or more queries. To write multiple queries,
+   surround them with parentheses. Such queries will be performed in the
+   specified order (whereas there are no guarantees about the execution
+   order of multiple rules for an object). The <replaceable
+   class="parameter">action</replaceable> can also be NOTHING indicating
+   no action. Thus, a DO INSTEAD NOTHING rule suppresses the original
+   query from executing (when its condition is true); a DO NOTHING rule
+   is useless.
   </para>
 
   <para>
index e6978192646ae90f15df82fa515f655b800c681a..bb7d59ffa1dd52c22ab8eff651d18c2bd26f63b3 100644 (file)
@@ -2841,7 +2841,6 @@ RuleStmt:  CREATE RULE name AS
 
 RuleActionList:  NOTHING                               { $$ = NIL; }
                | RuleActionStmt                                { $$ = makeList1($1); }
-               | '[' RuleActionMulti ']'               { $$ = $2; }
                | '(' RuleActionMulti ')'               { $$ = $2; } 
                ;
 
index 03b36aacb96e4727e31bb9e6b928f0a99065db69..b5877f5ef9a906c3e7ef876a075d6c75fbf8e21b 100644 (file)
@@ -2153,7 +2153,6 @@ RuleStmt:  CREATE RULE name AS
 
 RuleActionList:  NOTHING                               { $$ = make_str("nothing"); }
                | RuleActionStmt                        { $$ = $1; }
-               | '[' RuleActionMulti ']'               { $$ = cat_str(3, make_str("["), $2, make_str("]")); }
                | '(' RuleActionMulti ')'               { $$ = cat_str(3, make_str("("), $2, make_str(")")); }
                 ;