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

Postgres Decimal division returns double precision #10418

Open
GregoryTravis opened this issue Jul 1, 2024 · 0 comments
Open

Postgres Decimal division returns double precision #10418

GregoryTravis opened this issue Jul 1, 2024 · 0 comments
Assignees
Labels
-libs Libraries: New libraries to be implemented p-low Low priority

Comments

@GregoryTravis
Copy link
Contributor

Decimal/Decimal returns double precision because the / operator always casts to double precision. This cast is presumably there so that integer division will be done as floating point division.

Instead of always casting to double precision, we should only do this if both arguments are integer types.

@GregoryTravis GregoryTravis added p-low Low priority -libs Libraries: New libraries to be implemented labels Jul 1, 2024
@GregoryTravis GregoryTravis self-assigned this Jul 1, 2024
@GregoryTravis GregoryTravis changed the title Postgres DECIMAL division returns DOUBLE PRECISION Postgres Decimal division returns double precision Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
-libs Libraries: New libraries to be implemented p-low Low priority
Projects
Status: 🔧 Implementation
Development

No branches or pull requests

1 participant