pgrx
pgrx copied to clipboard
PgRange<T> type support
Mapping for PgRange<T> type
PgRange<T> maps to the PG *RangeType and provides mappings for int4range int8range daterange numrange tsrange and tstzrange
This does not yet include pg14 multirange variations
Note: work on mappings for std::ops::Range<T> is commented out for now as std::ops::Range<T> would only support "half-open" ranges (ex. [1..10)) with non-infinite bounds, and only on discrete types (to allow for [) pg's range canonicalization) so utility is very limited. Need to explore possibility of dyn RangeBounds<T> to handle all the different range possibilities (..] [..] (..) [..) (,)
Also:
Added infinity/-infinity support for Date, Timestamp, TimestampWithTimeZone
I still need to include some inline documentation
It looks like you ran the option to regenerate the bindings for docs.rs! That's 100% okay, but could I ask you to revert those changes for merging here? We prefer to do that all at once on release to avoid them constantly being regenerated due to different people having different postgres headers.
@Hoverbear just checking that this branch would not be buildable/testable (outside of my local) until merged with a full release?
@mhov:
just checking that this branch would not be buildable/testable (outside of my local) until merged with a full release?
As the publicly displayed bindings are mostly decorative, diffing them or not should have no effect on actually building the "develop" branch for end users.
Got it, i forgot that you'll generate them locally when you build anyways.
ok re-committed with the pgXX.rs changes omitted, keeping the pgXX.h changes.
Parking this PR for now until the proper fixes for Date/Timestamp infinity values are completed.