Skip to content

Commit 3082de3

Browse files
committed
fixes #1230
1 parent 96cd483 commit 3082de3

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/main/jjtree/net/sf/jsqlparser/parser/JSqlParserCC.jjt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4191,8 +4191,6 @@ CreateSchema CreateSchema():
41914191
(tk=<S_IDENTIFIER> | tk=<S_QUOTED_IDENTIFIER>) { schema.setAuthorization(tk.image); }
41924192
]
41934193

4194-
/* [ <K_DEFAULT> <K_CHARACTER> <K_SET> tk=<S_QUOTED_IDENTIFIER> | <S_IDENTIFIER> {} ] */
4195-
41964194
[schemaPath=PathSpecification() { schema.setSchemaPath(schemaPath); }]
41974195

41984196
(
@@ -4575,6 +4573,8 @@ List<String> CreateParameter():
45754573
)
45764574
{ param.add(retval); }
45774575
|
4576+
tk=<K_AS> { param.add(tk.image); }
4577+
|
45784578
tk=<K_ON> { param.add(tk.image); }
45794579
|
45804580
tk=<K_COMMIT> { param.add(tk.image); }

src/test/java/net/sf/jsqlparser/statement/create/CreateTableTest.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -833,4 +833,10 @@ public void testCreateTempTableAsSelect() throws JSQLParserException {
833833
assertSqlCanBeParsedAndDeparsed(
834834
"CREATE TEMP TABLE T1 (C1, C2) AS SELECT C3, C4 FROM T2");
835835
}
836+
837+
@Test
838+
public void testCreateTableIssue1230() throws JSQLParserException {
839+
assertSqlCanBeParsedAndDeparsed(
840+
"CREATE TABLE TABLE_HISTORY (ID bigint generated by default as identity, CREATED_AT timestamp not null, TEXT varchar (255), primary key (ID))");
841+
}
836842
}

0 commit comments

Comments
 (0)