From: Bruce Momjian Date: Sun, 10 Mar 2002 06:00:15 +0000 (+0000) Subject: Disable brackets in multi-statement rules, as discussed. X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=00405ea468d8cec7e60515a55c5d39cbd149ff06;p=users%2Fbernd%2Fpostgres.git Disable brackets in multi-statement rules, as discussed. --- diff --git a/doc/src/sgml/ref/create_rule.sgml b/doc/src/sgml/ref/create_rule.sgml index 0ccbb424d6..44b8ae3979 100644 --- a/doc/src/sgml/ref/create_rule.sgml +++ b/doc/src/sgml/ref/create_rule.sgml @@ -32,8 +32,6 @@ NOTHING query | ( query ; query ... ) -| -[ query ; query ... ] @@ -177,15 +175,15 @@ CREATE - The action 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 - action 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 action 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 action 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. diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y index e697819264..bb7d59ffa1 100644 --- a/src/backend/parser/gram.y +++ b/src/backend/parser/gram.y @@ -2841,7 +2841,6 @@ RuleStmt: CREATE RULE name AS RuleActionList: NOTHING { $$ = NIL; } | RuleActionStmt { $$ = makeList1($1); } - | '[' RuleActionMulti ']' { $$ = $2; } | '(' RuleActionMulti ')' { $$ = $2; } ; diff --git a/src/interfaces/ecpg/preproc/preproc.y b/src/interfaces/ecpg/preproc/preproc.y index 03b36aacb9..b5877f5ef9 100644 --- a/src/interfaces/ecpg/preproc/preproc.y +++ b/src/interfaces/ecpg/preproc/preproc.y @@ -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(")")); } ;