Skip to content
New issue

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

fixed postgres serialisation, deserialisation of decimal #243

Merged
merged 10 commits into from
May 20, 2020

Conversation

serejkaaa512
Copy link

@serejkaaa512 serejkaaa512 commented May 14, 2020

Fixes #241

Copy link
Owner

@paupino paupino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor changes/feedback. I think the major thing is perhaps changing with_scale to rescale (or something similar). I do also want to run some benchmarks on this too to ensure we don't regress since it is doing a bit more boxing.

src/decimal.rs Outdated Show resolved Hide resolved
src/decimal.rs Outdated Show resolved Hide resolved
src/decimal.rs Outdated Show resolved Hide resolved
src/postgres.rs Outdated Show resolved Hide resolved
src/postgres.rs Outdated Show resolved Hide resolved
@paupino
Copy link
Owner

paupino commented May 20, 2020

I think this is looking good. There are some minor adjustments I want to make in the docs, as well as making rescale mutable, however I will do that as part of the merge.
Before I finalize the merge I just want to review the rescale_to_maximum code to make sure it's both functionally equivalent as well as performant.
Thank you for working through this with me!

@paupino paupino merged commit 365f782 into paupino:master May 20, 2020
@paupino
Copy link
Owner

paupino commented May 20, 2020

For the record, performance seems fairly consistent between the two version with this version being slightly more performant. Future performance benchmarking should be built into the PR process wherever possible.

@serejkaaa512 serejkaaa512 deleted the fix/postgres branch May 20, 2020 06:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Strange conversion to PgNumeric
2 participants