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

Commite9edb3e

Browse files
committed
Fix for select 1;select 2 without trailing semi.
1 parenta8d2820 commite9edb3e

File tree

1 file changed

+9
-14
lines changed

1 file changed

+9
-14
lines changed

‎src/backend/parser/gram.y

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*
1111
*
1212
* IDENTIFICATION
13-
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.82 1999/05/21 18:31:06 momjian Exp $
13+
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.83 1999/05/22 05:06:43 momjian Exp $
1414
*
1515
* HISTORY
1616
* AUTHORDATEMAJOR EVENT
@@ -360,25 +360,20 @@ Oidparam_type(int t); /* used in parse_expr.c */
360360
%leftUNION INTERSECT EXCEPT
361361
%%
362362

363-
stmtblock: stmtmulti
363+
stmtblock: stmtmulti opt_semi
364364
{ parsetree = $1; }
365-
| stmt
366-
{ parsetree = lcons($1,NIL); }
367365
;
368366

369-
stmtmulti: stmtmulti stmt ';'
370-
{ $$ = lappend($1, $2); }
371-
/***S*I***/
372-
/* We comment the next rule because it seems to be redundant
373-
* and produces 16 shift/reduce conflicts with the new SelectStmt rule
374-
* needed for EXCEPT and INTERSECTS. So far I did not notice any
375-
* violations by removing the rule! */
376-
/* | stmtmulti stmt
377-
{ $$ = lappend($1, $2); } */
378-
| stmt ';'
367+
stmtmulti: stmtmulti ';' stmt
368+
{ $$ = lappend($1, $3); }
369+
| stmt
379370
{ $$ = lcons($1,NIL); }
380371
;
381372

373+
opt_semi:';'
374+
|/*EMPTY*/
375+
;
376+
382377
stmt : AddAttrStmt
383378
| AlterUserStmt
384379
| ClosePortalStmt

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp