We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FromSql
Get binary encoding from PostgreSQL:
test=# select numeric_send(1e28); numeric_send ------------------------ \x00010007000000000001 (1 row) test=# select numeric_send(1e29); numeric_send ------------------------ \x0001000700000000000a (1 row)
Call FromSql on Decimal:
Decimal
println!( "{:?}", Decimal::from_sql( &Type::NUMERIC, &[0x00, 0x01, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01] ) ); println!( "{:?}", Decimal::from_sql( &Type::NUMERIC, &[0x00, 0x01, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a] ) );
Expected:
Ok(100000000000000000000) Err(overflow error)
Actual:
Ok(100000000000000000000) thread 'main' panicked at rust_decimal-1.34.3/src/arithmetic_impls.rs:232:18: Multiplication overflowed
The text was updated successfully, but these errors were encountered:
Thank you for raising this! It is fortunately an easy issue to fix - I'll see if I can get something out shortly.
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Get binary encoding from PostgreSQL:
Call
FromSql
onDecimal
:Expected:
Actual:
The text was updated successfully, but these errors were encountered: