Skip to content

Commit ee27436

Browse files
committed
Disable brackets in multi-statement rules, as discussed.
1 parent f205095 commit ee27436

File tree

3 files changed

+11
-15
lines changed

3 files changed

+11
-15
lines changed

doc/src/sgml/ref/create_rule.sgml

Lines changed: 10 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.31 2002/01/24 18:28:15 tgl Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_rule.sgml,v 1.32 2002/03/10 06:00:13 momjian Exp $
33
PostgreSQL documentation
44
-->
55

@@ -32,8 +32,6 @@ NOTHING
3232
<replaceable class="parameter">query</replaceable>
3333
|
3434
( <replaceable class="parameter">query</replaceable> ; <replaceable class="parameter">query</replaceable> ... )
35-
|
36-
[ <replaceable class="parameter">query</replaceable> ; <replaceable class="parameter">query</replaceable> ... ]
3735
</synopsis>
3836

3937
<refsect2 id="R2-SQL-CREATERULE-1">
@@ -177,15 +175,15 @@ CREATE
177175
</para>
178176

179177
<para>
180-
The <replaceable class="parameter">action</replaceable> part of the rule
181-
can consist of one or more queries. To write multiple queries, surround
182-
them with either parentheses or square brackets. Such queries will be
183-
performed in the specified order (whereas there are no guarantees about
184-
the execution order of multiple rules for an object). The
185-
<replaceable class="parameter">action</replaceable> can also be NOTHING
186-
indicating no action. Thus, a DO INSTEAD NOTHING rule suppresses the
187-
original query from executing (when its condition is true); a DO NOTHING
188-
rule is useless.
178+
The <replaceable class="parameter">action</replaceable> part of the
179+
rule can consist of one or more queries. To write multiple queries,
180+
surround them with parentheses. Such queries will be performed in the
181+
specified order (whereas there are no guarantees about the execution
182+
order of multiple rules for an object). The <replaceable
183+
class="parameter">action</replaceable> can also be NOTHING indicating
184+
no action. Thus, a DO INSTEAD NOTHING rule suppresses the original
185+
query from executing (when its condition is true); a DO NOTHING rule
186+
is useless.
189187
</para>
190188

191189
<para>

src/backend/parser/gram.y

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*
1212
*
1313
* IDENTIFICATION
14-
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.289 2002/03/09 17:37:16 thomas Exp $
14+
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.290 2002/03/10 06:00:13 momjian Exp $
1515
*
1616
* HISTORY
1717
* AUTHOR DATE MAJOR EVENT
@@ -2841,7 +2841,6 @@ RuleStmt: CREATE RULE name AS
28412841

28422842
RuleActionList: NOTHING { $$ = NIL; }
28432843
| RuleActionStmt { $$ = makeList1($1); }
2844-
| '[' RuleActionMulti ']' { $$ = $2; }
28452844
| '(' RuleActionMulti ')' { $$ = $2; }
28462845
;
28472846

src/interfaces/ecpg/preproc/preproc.y

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2153,7 +2153,6 @@ RuleStmt: CREATE RULE name AS
21532153

21542154
RuleActionList: NOTHING { $$ = make_str("nothing"); }
21552155
| RuleActionStmt { $$ = $1; }
2156-
| '[' RuleActionMulti ']' { $$ = cat_str(3, make_str("["), $2, make_str("]")); }
21572156
| '(' RuleActionMulti ')' { $$ = cat_str(3, make_str("("), $2, make_str(")")); }
21582157
;
21592158

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy