sasikanth-th opened a new issue, #18896:
URL: https://github.com/apache/shardingsphere/issues/18896
## Bug Report
### Which version of ShardingSphere did you use?
5.1.2
### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
ShardingSphere-JDBC
### Expected behavior
Able to create postgresql table with timestamp
### Actual behavior
Unable to create table with timestamp
```
Caused by: liquibase.exception.DatabaseException: You have an error in your
SQL syntax [Failed SQL: CREATE TABLE public.files (id BIGINT NOT NULL,
created_at TIMESTAMP WITHOUT TIME ZONE, updated_at TIMESTAMP WITHOUT TIME ZONE,
created_by BIGINT, updated_by BIGINT, name VARCHAR(255), path VARCHAR(255),
CONSTRAINT files_pkey PRIMARY KEY (id))]
at
liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:397)
~[liquibase-core-4.9.1.jar:na]
at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:83)
~[liquibase-core-4.9.1.jar:na]
at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:151)
~[liquibase-core-4.9.1.jar:na]
at
liquibase.database.AbstractJdbcDatabase.execute(AbstractJdbcDatabase.java:1279)
~[liquibase-core-4.9.1.jar:na]
at
liquibase.database.AbstractJdbcDatabase.executeStatements(AbstractJdbcDatabase.java:1261)
~[liquibase-core-4.9.1.jar:na]
at liquibase.changelog.ChangeSet.execute(ChangeSet.java:661)
~[liquibase-core-4.9.1.jar:na]
... 56 common frames omitted
Caused by:
org.apache.shardingsphere.sql.parser.exception.SQLParsingException: You have an
error in your SQL syntax
at
org.apache.shardingsphere.sql.parser.core.database.parser.SQLParserExecutor.twoPhaseParse(SQLParserExecutor.java:65)
~[shardingsphere-sql-parser-engine-5.1.1.jar:5.1.1]
at
org.apache.shardingsphere.sql.parser.core.database.parser.SQLParserExecutor.parse(SQLParserExecutor.java:46)
~[shardingsphere-sql-parser-engine-5.1.1.jar:5.1.1]
at
org.apache.shardingsphere.sql.parser.api.SQLParserEngine.parse(SQLParserEngine.java:47)
~[shardingsphere-sql-parser-engine-5.1.1.jar:5.1.1]
at
org.apache.shardingsphere.infra.parser.sql.SQLStatementParserExecutor.parse(SQLStatementParserExecutor.java:48)
~[shardingsphere-infra-parser-5.1.1.jar:5.1.1]
at
org.apache.shardingsphere.infra.parser.sql.SQLStatementParserEngine.parse(SQLStatementParserEngine.java:47)
~[shardingsphere-infra-parser-5.1.1.jar:5.1.1]
at
org.apache.shardingsphere.infra.parser.ShardingSphereSQLParserEngine.parse(ShardingSphereSQLParserEngine.java:58)
~[shardingsphere-infra-parser-5.1.1.jar:5.1.1]
at
org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSphereStatement.createLogicSQL(ShardingSphereStatement.java:461)
~[shardingsphere-jdbc-core-5.1.1.jar:5.1.1]
at
org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSphereStatement.execute0(ShardingSphereStatement.java:418)
~[shardingsphere-jdbc-core-5.1.1.jar:5.1.1]
at
org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSphereStatement.execute(ShardingSphereStatement.java:355)
~[shardingsphere-jdbc-core-5.1.1.jar:5.1.1]
at
liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:393)
~[liquibase-core-4.9.1.jar:na]
... 61 common frames omitted
```
### Reason analyze (If you can)
The postgres parser is failing incase of timestamp
### Steps to reproduce the behavior, such as: SQL to execute, sharding rule
configuration, when exception occur etc.
Configuration
```
logging:
level:
com:
zaxxer:
hikari:
pool:
ProxyConnection: ERROR
spring:
liquibase:
change-log: [secret]
default-schema: public
liquibase-schema: public
enabled: true
shardingsphere:
datasource:
names: write-ds,read-ds
write-ds:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: org.postgresql.Driver
jdbc-url: jdbc:postgresql://localhost:5432/testgres
username: postgres
password: postgres
maxLifetime: 25
minIdle: 5
schema: public
read-ds:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: org.postgresql.Driver
jdbc-url: jdbc:postgresql://localhost:5432/testgres
username: postgres
password: postgres
maxLifetime: 25
minIdle: 5
schema: public
rules:
readwrite-splitting:
data-sources:
readwrite_ds:
type: Static
load-balancer-name: round_robin
props:
write-data-source-name: write-ds
read-data-source-names: read-ds
load-balancers:
round_robin:
type: ROUND_ROBIN
schema:
name: public
```
SQL
```
CREATE TABLE public.files (id BIGINT NOT NULL, created_at TIMESTAMP WITHOUT
TIME ZONE, updated_at TIMESTAMP WITHOUT TIME ZONE, created_by BIGINT,
updated_by BIGINT, name VARCHAR(255), path VARCHAR(255), CONSTRAINT files_pkey
PRIMARY KEY (id))
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail:
[email protected]
For queries about this service, please contact Infrastructure at:
[email protected]