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

Commitee27436

Browse files
committed
Disable brackets in multi-statement rules, as discussed.
1 parentf205095 commitee27436

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 witheitherparentheses or square brackets.Such queries will be
183-
performed in thespecified order (whereas there are no guarantees about
184-
the executionorder of multiple rules for an object).The
185-
<replaceableclass="parameter">action</replaceable> can also be NOTHING
186-
indicatingno action.Thus, a DO INSTEAD NOTHING rule suppresses the
187-
originalquery from executing (when its condition is true); a DO NOTHING
188-
ruleis useless.
178+
The <replaceable class="parameter">action</replaceable> part of the
179+
rulecan consist of one or more queries. To write multiple queries,
180+
surroundthem 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
* AUTHORDATEMAJOR 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)

[8]ページ先頭

©2009-2025 Movatter.jp