v0.9.0
Welcome to pgrx
v0.9.0. This is a big release as it brings significantly improved date and time support, which includes some breaking API changes for those types.
When upgrading, make sure to update your Cargo.toml
files and also cargo install cargo-pgrx --locked
.
Improved Date, Time, Interval Support
v0.9.0 adds quite a bit of functionality around pgrx
' date/time/interval handling (#1139). The various Date
, Time
, TimeWithTimeZone
, Timestamp
, TimestampWithTimeZone
, and Interval
types can now:
- be constructed through code in various ways
- converted between each other where approporiate
- have math operations performed on them (ie, adding a
date + time
results in aTimestamp
, addingtime + interval
results in a new time, etc) - be formatted as strings for display purposes using Postgres output functions
- be serialized/deserialized with
serde
as ISO-conforming "json" strings using Postgres formatting - have their individual parts extracted
- much more!
In doing this, we've removed the time-crate
feature flag. pgrx
has no plans to continue to support the external time
crate or even chronos
. The new built-in functionality is very complete. Should more work be required we'd prefer to do it here and rely on Postgres to do the actual date/time math code correctly.
There's also a new example (pgrx-examples/datetime/
) showing off some of the new capabilities.
Array Support
Arrays have gotten a little more love. Arrays of non-null primitive types can now be represented as slices, which can help to drastically improve random access and iteration performance.
- Optimize zero-copy arrays around fixed-size types by @eeeebbbbrrrr in #1145
- Add Array slice support for primitive types (i8/16/32/64, f32/64) by @eeeebbbbrrrr in #1147
- don't free the backing Array Datum pointer on drop, even if it was detoasted by @eeeebbbbrrrr in #1149 (related to issue #971)
- Few small array changes by @thomcc in #1148
Additional Bindings
- include generic xlog related api by @kemingy in #1135
- Add lock manager related api by @usamoi in #1140
Stability/Correctness issues
- Within the NUMERIC support code, stop comparing function pointers by @eeeebbbbrrrr in #1138
- fix issue #1141: immediately report FATAL and PANIC by @eeeebbbbrrrr in #1142
- Fix errant SQL generation for Aggregates by @phlay in #1134
Testing Framework
- Wait for postmaster.pid during
cargo pgrx test
by @eeeebbbbrrrr in #1150
Dependencies
- upgrade all dependencies (except for
syn
) to their latest versions by @eeeebbbbrrrr in #1151
New Contributors
Full Changelog: v0.8.4...v0.9.0