-
Notifications
You must be signed in to change notification settings - Fork 590
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
streaming: ban double / decimal as pk #3863
Comments
Is it considered a bug, due to ser/deser or the decimal library we use? |
This comment was marked as off-topic.
This comment was marked as off-topic.
I think it is expected. Data values like decimal / double is not closed under addition. e.g., 1.0 + 100000000000.0 - 100000000000.0 won't produce 1.0 due to precision issues. The same applies to decimal. I guess it would make things wrong in some places. |
Agree that double indeed needs to be banned, as we have no way of controlling these precision issues as long as we use the built-in double type in rust. For decimal, I thought by its specification in PG, it is expected to be precise/exact. My guess is that the current crate for decimal is quite limited due to its support for only 28 digits(scale? or something like that). If we would like to improve (e.g. by choosing another crate), it could be improved. But still agree with banning it first, as decimal as part of pk should be a very rare case |
The issue for As for |
Regarding to being user-friendly, this should be banned on the frontend side on certain queries, such as group by any |
This issue has been open for 60 days with no activity. Could you please update the status? Feel free to continue discussion or close as not planned. |
Using them as PK might cause some keys not being successfully deleted.
The text was updated successfully, but these errors were encountered: