TeslaCN opened a new issue #10646:
URL: https://github.com/apache/shardingsphere/issues/10646
## Bug Report
### Which version of ShardingSphere did you use?
master
### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
Proxy
### Expected behavior
Insert a row.
### Actual behavior
```
Exception in thread "main" org.postgresql.util.PSQLException: ERROR: column
"create_time" is of type timestamp without time zone but expression is of type
character varying
Hint: You will need to rewrite or cast the expression.
Position: 64
at
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2440)
at
org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2183)
at
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:308)
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:441)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:365)
at
org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:143)
at
org.postgresql.jdbc.PgPreparedStatement.executeUpdate(PgPreparedStatement.java:120)
at icu.wwj.Timestamp.proxy(Timestamp.java:30)
at icu.wwj.Timestamp.main(Timestamp.java:12)
```
### Reason analyze (If you can)
### Steps to reproduce the behavior, such as: SQL to execute, sharding rule
configuration, when exception occur etc.
```sql
create table t_order
(
order_id bigint not null
constraint t_order_0_pkey
primary key,
create_time timestamp default CURRENT_TIMESTAMP not null,
user_id bigint not null,
order_name varchar(1000) default ''::character varying not null,
amount integer default 0
);
```
```java
try (PreparedStatement preparedStatement =
connection.prepareStatement("insert into t_order (create_time, user_id) values
(?, ?)")) {
preparedStatement.setTimestamp(1, new
java.sql.Timestamp(System.currentTimeMillis()));
preparedStatement.setLong(2, 8888);
preparedStatement.executeUpdate();
}
```
### Example codes for reproduce this issue (such as a github link).
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]