An error is reported when PostgreSQL money type queries large numbers
Which version of ShardingSphere did you use?
master branch PostgreSQL 14
Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
ShardingSphere-Proxy
Expected behavior
return correct result
Actual behavior
return error
Reason analyze (If you can)
The money field in PostgreSQL is detected with ’ , ‘
Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
1、create table
create table table_mix
(
id bigint primary key ,
shard_id bigint not null,
t_money money null
);
2、insert datas
insert into table_mix (id, shard_id, t_money)
values (1, 2, 9999999);
3、error
sharding_db=> select * from table_mix;
ERROR: 不良的类型值 double : 9,999,999.00
Example codes for reproduce this issue (such as a github link).
Using psql query returns normal
demo_ds_0=# select * from table_mix;
id | shard_id | t_money
----+----------+---------------
1 | 2 | $9,999,999.00
(1 row)
I want to investigate this issue.
@ReyYang I found this issue is because of postgresql jdbc bug. Avoid to use money type. And postgresql jdbc seems no plan to fix this. refer to this
Hello , this issue has not received a reply for several days. This issue is supposed to be closed.
There hasn't been any activity on this issue recently, and in order to prioritize active issues, it will be marked as stale.