Open xoac opened 1 year ago
Looking a bit more into this, it seems like bigdecimal
has a number of concerning implementation issues.
The maintainer of rust_decimal
has expressed interest in implementing arbitrary precision https://github.com/paupino/rust-decimal/issues/562#issuecomment-1381169106. This might be something we just have to wait for unless we can find another decent big decimal crate.
See also this comment on why Borsch (a serialization format) didn't implement bigdecimal
support https://github.com/near/borsh-rs/pull/91#issuecomment-1277935244.
Hi cornucopia team, I have found another place where it's hard to work with cornucopia,. It's completely fine to insert
7777777777777777777777777777777777777777777777777777
into PostgreSQL DECIMAL column.Unfortunately
rust_decimal::Decimal::from_str('7777777777777777777777777777777777777777777777777777')
will return error so using it to represent DECIMAL is limited.On possible solution: