1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-08 22:02:03 +03:00

Disable brackets in multi-statement rules, as discussed.

This commit is contained in:
Bruce Momjian 2002-03-10 06:00:15 +00:00
parent f20509551d
commit ee27436f6c
3 changed files with 11 additions and 15 deletions

View File

@ -1,5 +1,5 @@
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_rule.sgml,v 1.31 2002/01/24 18:28:15 tgl Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/ref/create_rule.sgml,v 1.32 2002/03/10 06:00:13 momjian Exp $
PostgreSQL documentation PostgreSQL documentation
--> -->
@ -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> ; <replaceable class="parameter">query</replaceable> ... )
|
[ <replaceable class="parameter">query</replaceable> ; <replaceable class="parameter">query</replaceable> ... ]
</synopsis> </synopsis>
<refsect2 id="R2-SQL-CREATERULE-1"> <refsect2 id="R2-SQL-CREATERULE-1">
@ -177,15 +175,15 @@ CREATE
</para> </para>
<para> <para>
The <replaceable class="parameter">action</replaceable> part of the rule The <replaceable class="parameter">action</replaceable> part of the
can consist of one or more queries. To write multiple queries, surround rule can consist of one or more queries. To write multiple queries,
them with either parentheses or square brackets. Such queries will be surround them with parentheses. Such queries will be performed in the
performed in the specified order (whereas there are no guarantees about specified order (whereas there are no guarantees about the execution
the execution order of multiple rules for an object). The order of multiple rules for an object). The <replaceable
<replaceable class="parameter">action</replaceable> can also be NOTHING class="parameter">action</replaceable> can also be NOTHING indicating
indicating no action. Thus, a DO INSTEAD NOTHING rule suppresses the no action. Thus, a DO INSTEAD NOTHING rule suppresses the original
original query from executing (when its condition is true); a DO NOTHING query from executing (when its condition is true); a DO NOTHING rule
rule is useless. is useless.
</para> </para>
<para> <para>

View File

@ -11,7 +11,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.289 2002/03/09 17:37:16 thomas Exp $ * $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.290 2002/03/10 06:00:13 momjian Exp $
* *
* HISTORY * HISTORY
* AUTHOR DATE MAJOR EVENT * AUTHOR DATE MAJOR EVENT
@ -2841,7 +2841,6 @@ RuleStmt: CREATE RULE name AS
RuleActionList: NOTHING { $$ = NIL; } RuleActionList: NOTHING { $$ = NIL; }
| RuleActionStmt { $$ = makeList1($1); } | RuleActionStmt { $$ = makeList1($1); }
| '[' RuleActionMulti ']' { $$ = $2; }
| '(' RuleActionMulti ')' { $$ = $2; } | '(' RuleActionMulti ')' { $$ = $2; }
; ;

View File

@ -2153,7 +2153,6 @@ RuleStmt: CREATE RULE name AS
RuleActionList: NOTHING { $$ = make_str("nothing"); } RuleActionList: NOTHING { $$ = make_str("nothing"); }
| RuleActionStmt { $$ = $1; } | RuleActionStmt { $$ = $1; }
| '[' RuleActionMulti ']' { $$ = cat_str(3, make_str("["), $2, make_str("]")); }
| '(' RuleActionMulti ')' { $$ = cat_str(3, make_str("("), $2, make_str(")")); } | '(' RuleActionMulti ')' { $$ = cat_str(3, make_str("("), $2, make_str(")")); }
; ;