-
Notifications
You must be signed in to change notification settings - Fork 613
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
exp
is not fully compatible with PG
#8025
Comments
Just for clarification, this ticket to update RW to have the same behavior as PG when the |
Hi @erichgess, I think you are right, we intend to let RW have the same behavior as PG's, i.e. report |
Your point on the other ticket about not artificially restricting RW to what PG can do makes a lot of sense, but in this case, certainly, I think what PG is doing is the correct path, because their goal is to have consistent behavior across all platforms. Could I hop on this ticket? |
Sure @erichgess, I think your reasoning makes sense |
Great, thank you. |
@lmatz PG has separate error codes for flow overflow and underflow, but RW only has Is the long term plan to eventually have the error codes in RW have the same granularity as the error codes from PG? |
@erichgess If you'd like to use overflow and underflow instead of simply out of range, feel free to change it. This is a good point! |
@lmatz The PG implementation uses |
@erichgess, sure if you'd like to, |
Should this ticket be closed now that the PR is merged? |
Thank you @erichgess |
For example:
select exp(-10000000);
returns 0 in RWbut it errors
underflow
in PGSee comments at #7971 (comment)
PG has special logic for this: https://github.com/postgres/postgres/blob/REL_15_2/src/backend/utils/adt/float.c#L1649
The text was updated successfully, but these errors were encountered: