Skip to content

Commit

Permalink
fixes #468
Browse files Browse the repository at this point in the history
  • Loading branch information
wumpz committed Jun 28, 2017
1 parent c23558f commit 6cb459d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/jjtree/net/sf/jsqlparser/parser/JSqlParserCC.jjt
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ TOKEN : /* Operators */

TOKEN : /* Date/Time with time zones */
{
<DT_ZONE: <K_DATETIMELITERAL> <WHITESPACE> (<K_WITH> | <K_WITHOUT>) <WHITESPACE> "TIME" <WHITESPACE> <K_ZONE>>
<DT_ZONE: <K_DATETIMELITERAL> (<WHITESPACE>)* ("(" <S_LONG> ")")? (<WHITESPACE>)* (<K_WITH> | <K_WITHOUT>) (<WHITESPACE>)+ "TIME" (<WHITESPACE>)+ <K_ZONE>>
}

TOKEN : /* Numeric Constants */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,15 @@ public void testCreateUnitonIssue402() throws JSQLParserException {
public void testCreateUnitonIssue402_2() throws JSQLParserException {
assertSqlCanBeParsedAndDeparsed("CREATE TABLE temp.abc AS (SELECT sku FROM temp.a UNION SELECT sku FROM temp.b)");
}

public void testTimestampWithTimezone() throws JSQLParserException {
assertSqlCanBeParsedAndDeparsed("CREATE TABLE country_region (" +
"regionid BIGINT NOT NULL CONSTRAINT pk_auth_region PRIMARY KEY, " +
"region_name VARCHAR (100) NOT NULL, " +
"creation_date TIMESTAMP (0) WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP (0) NOT NULL, " +
"last_change_date TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP (0), " +
"CONSTRAINT region_name_unique UNIQUE (region_name))");
}

public void testRUBiSCreateList() throws Exception {
BufferedReader in = new BufferedReader(new InputStreamReader(CreateTableTest.class.
Expand Down

0 comments on commit 6cb459d

Please sign in to comment.