github tcdi/pgrx v0.9.0

one day ago

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 a Timestamp, adding time + 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.

Additional Bindings

Stability/Correctness issues

Testing Framework


  • upgrade all dependencies (except for syn) to their latest versions by @eeeebbbbrrrr in #1151

New Contributors

Full Changelog: v0.8.4...v0.9.0

Don't miss a new pgrx release

NewReleases is sending notifications on new releases.