aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/backend/parser/gram.y23
1 files changed, 9 insertions, 14 deletions
diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y
index a0f9e8a43b7..c038f43caae 100644
--- a/src/backend/parser/gram.y
+++ b/src/backend/parser/gram.y
@@ -10,7 +10,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.82 1999/05/21 18:31:06 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.83 1999/05/22 05:06:43 momjian Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
@@ -360,25 +360,20 @@ Oid param_type(int t); /* used in parse_expr.c */
%left UNION INTERSECT EXCEPT
%%
-stmtblock: stmtmulti
+stmtblock: stmtmulti opt_semi
{ parsetree = $1; }
- | stmt
- { parsetree = lcons($1,NIL); }
;
-stmtmulti: stmtmulti stmt ';'
- { $$ = lappend($1, $2); }
-/***S*I***/
-/* We comment the next rule because it seems to be redundant
- * and produces 16 shift/reduce conflicts with the new SelectStmt rule
- * needed for EXCEPT and INTERSECTS. So far I did not notice any
- * violations by removing the rule! */
-/* | stmtmulti stmt
- { $$ = lappend($1, $2); } */
- | stmt ';'
+stmtmulti: stmtmulti ';' stmt
+ { $$ = lappend($1, $3); }
+ | stmt
{ $$ = lcons($1,NIL); }
;
+opt_semi: ';'
+ | /*EMPTY*/
+ ;
+
stmt : AddAttrStmt
| AlterUserStmt
| ClosePortalStmt