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

Match the Postgres repr in Time and TimeWithTimeZone #677

Merged

Conversation

workingjubilee
Copy link
Member

@workingjubilee workingjubilee commented Sep 9, 2022

By using a Rust-side repr that more closely reflects the internal implementation of Postgres, we head off various issues we potentially could encounter with not being able to reflect the full range that Postgres can in its implementation of these types, versus the edges that time types runs up against (e.g. not having the concept of a temporal "infinity" or "-infinity"). These last two types do not have quite the same problems per se, but we previously were discarding information to achieve a goal in serialization, when that can be done by simply altering the way the type is serialized.

This completes #618 for all of the Postgres temporal types, reducing the likelihood of a forced breakage in the future if the time crate alters its implementation. We also avoid the overhead of calling potentially costly conversion functions that was noted in #504 until such points as serialization.

@workingjubilee workingjubilee merged commit 48faf5d into pgcentralfoundation:develop Sep 21, 2022
@workingjubilee workingjubilee mentioned this pull request Sep 29, 2022
14 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant