Closed dacrypt closed 5 years ago
@mjibson could you PTAL? It looks like the input decimals are much too long, but presumably we should be able to handle unlimited-size decimals anyway.
Hi, thanks for replying. I'm aware of the length of the decimals. The decimals are the result of a financial mathematic operation. Keeping the whole decimals is desirable in this case. I'm just storing the value as it comes.
I couldn't find a limit of decimals in the docs so I guess this must be a bug or something.
That number is 2010 digits long. We only support 2000 digits. This is indeed a difference between us and postgres. It's more a known limitation than a bug, though. We are unlikely to change this in the upcoming release. I've wanted to make our decimal precision match postgres for a while, so maybe in the next release we will be able to address this.
For now the best we can do is either you truncate to 2k digits or use a string and do your math in your application.
cc @rafiss
Describe the problem
Error trying to store a decimal (github.com/shopspring/decimal) value into a decimal column type.
To Reproduce