-
-
Notifications
You must be signed in to change notification settings - Fork 250
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
overhaul our Postgres Range support #1050
Merged
Merged
Commits on Feb 20, 2023
-
overhaul our Postgres Range support
- We now go ahead and deconstruct the range value in the `FromDatum` implementation. Immediately, this fixes issues with `pg_sys::RangeBound.val` datums potentially being able to be used after free. - `RangeData` is gone and replaced with a more idiomatic `RangeBound` enum, to which the internal Postgres `pg_sys::RangeBound` struct can be mapped. - We provide `From<std::ops::Range*>` impls for all of Rust's built-in Range types. - Our `pgx::Range` can be constructed from any type that can be converted into a `RangeBound` and we provide direct impls for the set of supported `RangeSubType` types along with `Option<T: RangeSubType>` which maps `Some` to `::Inclusive` and `None` to `::Infinite`. - The idea that a Postgres range can be "empty" is properly relayed through `Range`'s public API - add an example (albeit puny)
Configuration menu - View commit details
-
Copy full SHA for 5d33f22 - Browse repository at this point
Copy the full SHA 5d33f22View commit details -
Configuration menu - View commit details
-
Copy full SHA for a23389c - Browse repository at this point
Copy the full SHA a23389cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1689bcf - Browse repository at this point
Copy the full SHA 1689bcfView commit details -
Configuration menu - View commit details
-
Copy full SHA for 84f42f8 - Browse repository at this point
Copy the full SHA 84f42f8View commit details -
Configuration menu - View commit details
-
Copy full SHA for d55c26e - Browse repository at this point
Copy the full SHA d55c26eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 61c27fc - Browse repository at this point
Copy the full SHA 61c27fcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9922454 - Browse repository at this point
Copy the full SHA 9922454View commit details
Commits on Feb 21, 2023
-
- add a few help methods to `RangeBound` - `impl Display for Range<T> where T: Display`
Configuration menu - View commit details
-
Copy full SHA for c04bd8c - Browse repository at this point
Copy the full SHA c04bd8cView commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.