Skip to content

Commit 3de91c1

Browse files
committed
Fix broken parsing of CREATE TABLE AS (looks like a mis-sync with main
parser).
1 parent aff700a commit 3de91c1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/interfaces/ecpg/preproc/preproc.y

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/preproc.y,v 1.293 2004/07/20 18:06:41 meskes Exp $ */
1+
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/preproc.y,v 1.294 2004/08/11 22:50:35 tgl Exp $ */
22

33
/* Copyright comment */
44
%{
@@ -1546,14 +1546,14 @@ OptTableSpace: TABLESPACE name { $$ = cat2_str(make_str("tablespace"), $2); }
15461546
* SELECT ... INTO.
15471547
*/
15481548

1549-
CreateAsStmt: CREATE OptTemp TABLE qualified_name OptCreateAs WithOidsAs AS
1549+
CreateAsStmt: CREATE OptTemp TABLE qualified_name OptCreateAs WithOidsAs
15501550
{ FoundInto = 0; }
15511551
SelectStmt
15521552
{
15531553
if (FoundInto == 1)
15541554
mmerror(PARSE_ERROR, ET_ERROR, "CREATE TABLE / AS SELECT may not specify INTO");
15551555

1556-
$$ = cat_str(8, make_str("create"), $2, make_str("table"), $4, $5, $6, make_str("as"), $9);
1556+
$$ = cat_str(8, make_str("create"), $2, make_str("table"), $4, $5, $6, $8);
15571557
}
15581558
;
15591559

0 commit comments

Comments
 (0)