Commit e9edb3ef authored by Bruce Momjian's avatar Bruce Momjian

Fix for select 1;select 2 without trailing semi.

parent a8d2820e
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment