You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/01/14 08:36:49 UTC

[GitHub] [shardingsphere] ReyYang opened a new issue #14769: An error is reported when PostgreSQL money type queries large numbers

ReyYang opened a new issue #14769:
URL: https://github.com/apache/shardingsphere/issues/14769


   ### 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
   ``` sql
   create table table_mix
   (
       id       bigint primary key ,
       shard_id bigint not null,
       t_money  money  null
   );
   ```
   2、insert datas
   ```sql
   insert into table_mix (id, shard_id, t_money)
   values (1, 2, 100.4);
   insert into table_mix (id, shard_id, t_money)
   values (2, 3, 10.5);
   insert into table_mix (id, shard_id, t_money)
   values (3, 4, 19.03);
   insert into table_mix (id, shard_id, t_money)
   values (4, 5, 999990);
   insert into table_mix (id, shard_id, t_money)
   values (5, 1, 99999.98988);
   insert into table_mix (id, shard_id, t_money)
   values (6, 6, 100);
   ```
   3、error
   ```shell
   sharding_db=> select * from table_mix;
   ERROR:  不良的类型值 double : 9,999,999.00
   ```
   ### 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.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] tuichenchuxin commented on issue #14769: An error is reported when PostgreSQL money type queries large numbers

Posted by GitBox <gi...@apache.org>.
tuichenchuxin commented on issue #14769:
URL: https://github.com/apache/shardingsphere/issues/14769#issuecomment-1015116336


   @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](https://github.com/pgjdbc/pgjdbc/issues/1835)


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] ReyYang edited a comment on issue #14769: An error is reported when PostgreSQL money type queries large numbers

Posted by GitBox <gi...@apache.org>.
ReyYang edited a comment on issue #14769:
URL: https://github.com/apache/shardingsphere/issues/14769#issuecomment-1012919726


   Using psql query returns normal
   ```shell
   demo_ds_0=# select * from table_mix;
    id | shard_id |    t_money
   ----+----------+---------------
     1 |        2 | $9,999,999.00
   (1 row)
   ```


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] ReyYang commented on issue #14769: An error is reported when PostgreSQL money type queries large numbers

Posted by GitBox <gi...@apache.org>.
ReyYang commented on issue #14769:
URL: https://github.com/apache/shardingsphere/issues/14769#issuecomment-1012919726


   Using psql query returns normal
   ```shell
   demo_ds_0=# select * from table_mix;
    id | shard_id |    t_money
   ----+----------+---------------
     6 |        6 | $9,999,999.00
   (1 row)
   ```


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] tuichenchuxin commented on issue #14769: An error is reported when PostgreSQL money type queries large numbers

Posted by GitBox <gi...@apache.org>.
tuichenchuxin commented on issue #14769:
URL: https://github.com/apache/shardingsphere/issues/14769#issuecomment-1015091244


   I want to investigate this issue.


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org