Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upAttempting to serialize `BigDecimal::from_str("10000.16")` fails on PG #1044
Comments
This comment has been minimized.
|
/cc @rubdos |
This comment has been minimized.
|
10 000 is suspicious since pg stores numeric values in base 10k |
This comment has been minimized.
|
When I encountered this issue, the error I got was: error importing: DatabaseError("invalid digit in external "numeric" value") |
This comment has been minimized.
|
The representation I get for |
This comment has been minimized.
|
The fix is relatively trivial. Just improving our test coverage and making sure this doesn't affect numbers after the decimal point as well |
added a commit
that referenced
this issue
Jul 27, 2017
sgrif
referenced this issue
Jul 27, 2017
Merged
Properly encode `BigDecimal` values whose first digit is 10k #1046
added a commit
that referenced
this issue
Jul 27, 2017
sgrif
closed this
in
#1046
Jul 27, 2017
added a commit
to Fiedzia/diesel
that referenced
this issue
Jul 31, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
sgrif commentedJul 26, 2017
To reproduce: