Skip to content

Releases: pgcentralfoundation/pgrx

v0.10.0-beta.0

08 Jul 19:22
60baf0a
Compare
Choose a tag to compare
v0.10.0-beta.0 Pre-release
Pre-release

Welcome to pgrx v0.10.0-beta.0.

This is a big release in that it brings PostgreSQL 16 Beta 2 support along with a few bug fixes.

🎉 This is also our first release under the stewardship of the PgCentral Foundation 🎉

If you'd like to help beta test please install cargo-pgrx with:

# cargo install cargo-pgrx --version 0.10.0-beta.0 --locked`

and then run

cargo pgrx init

to get the pgrx-managed version of Postgres 16beta2 locally installed.

This pgrx release is a beta because of the new Postgres 16beta2 support. There's some new infrastructure in the code for managing Postgres beta releases which will hopefully make it easy down the road when Postgres 17 comes around. So we'd like to make sure that's working on computers that aren't ours in addition to generally making sure the pgrx-specific changes to support 16beta2 are solid.

However, after a couple of pgrx v0.10.0 beta releases, we'll release the final version regardless of the Postgres 16 state. We'll simply continue to include the latest 16 beta/rc and publish point releases as 16 progresses.

When 16 is finally GA, we'll add that to whatever the latest pgrx release happens to be at that time.

Postgres 16 Beta2 Support

pgrx v0.10.0-beta.0 is the first pgrx release to support the new Postgres Beta series. Note that this release is tied to 16beta2, and a new pgrx release will need to be done for any subsequent 16 betas or release candidates. We intend to support these in a timely manner.

Note that pgrx only understands pg16 as the Postgres version feature flag. It is not possible for pgrx or pgrx-based extensions to support multiple betas at the same time.

You'll want to run a cargo pgrx init to get the support, if you want it.

Using pg16beta2 is a simple matter of adding:

pg16 = ["pgrx/pg16", "pgrx-tests/pg16" ]

to the [features] block of your Cargo.toml files and then targeting pg16 instead of any other version.

In general, there aren't a lot of user-facing internal Postgres API changes between 15 and 16, but there are some, so it's possible you'll need some #[cfg(feature = "pg16")] directives.

One breaking change that impacts pgrx across all supported versions is that string GUCs are now represented as GucSetting<Option<&'static CStr>>. Previously they were GucSetting<Option<&'static str>> which is a) strictly incorrect and b) incompatible with pg16.

If you find any issues with 16beta2 support, please file issues here on GitHub.

beta1 support was soon replaced by:

Bug Fixes

CI Changes

This test has been causing our CI some trouble -- we are investigating why

New Features

Misc Changes

New Contributors

Thanks

Thanks to @ChronicallyJD and the @pgcentralfoundation for their stewardship. We're looking forward to a bright future of extending Postgres with Rust!

Full Changelog: v0.9.7...v0.10.0-beta.0

v0.9.7

29 Jun 14:42
f048ce9
Compare
Choose a tag to compare

This is pgrx v0.9.7. It fixes an important bug when working with arrays that have leading NULL elements. Such arrays could lead to spurious Postgres errors or even crashes when iterating.

Please upgrade your pgrx projects as soon as you can, making sure to update your crate dependencies and to cargo install cargo-pgrx --locked.

What's Changed

PR #1180 - Arrays with leading NULL values are now properly advanced during iteration.

Thanks!

Big thanks to @workingjubilee for some late-night debugging!

Full Changelog: v0.9.6...v0.9.7

v0.9.6

20 Jun 23:44
6219d06
Compare
Choose a tag to compare

This is an "out of band" patch release for a v0.9.6, based directly off v0.9.5. This release fixes a bug with Datum to Date conversions. Unfortunately, this bug essentially manifests itself as a Y2K bug where dates prior to 2000-01-01, when used in an Array<Date> fail to convert.

When updating, please make sure to cargo install cargo-pgrx --locked and update your crate dependencies to v0.9.6.

What's Changed

  • PR #1177: Cast Date Datums to pg_sys::DateADT (i32) instead of isize

Full Changelog: v0.9.5...v0.9.6

v0.9.5

09 Jun 22:42
ecbf925
Compare
Choose a tag to compare

This is pgrx v0.9.5. It contains no code changes. It simply under-specifies its dependency on serde in an effort to make serde easier to use by pgrx-based crates.

As always, please update cargo-pgrx with cargo install cargo-pgrx --locked and also update your extension crate dependencies.

What's Changed

  • Underspecify rather than overspecify the serde/serde_json/serde_derive versions we require by @thomcc in #1167

Full Changelog: v0.9.4...v0.9.5

v0.9.4

08 Jun 16:37
65a507d
Compare
Choose a tag to compare

Welcome to pgrx v0.9.4. It is a minor bugfix release resolving an issue returning a TableIterator with only 1 field.

As always, please update with cargo install cargo-pgrx --locked and update your crate dependencies.

What's Changed

  • Properly Support RETURNS TABLE (T) (returning a table with 1 field) by @eeeebbbbrrrr in #1164. This closes Issue #1031 and #1091
  • Remove pgrx/Cargo.toml dependency on the time crate 579f29f

Full Changelog: v0.9.3...asdf

v0.9.3

07 Jun 15:55
0bdc3ad
Compare
Choose a tag to compare

pgrx v0.9.3 is a minor update that resolves some issues with the relatively new zero-copy array support. There are no user-facing changes in this release.

As always, please install it with cargo install cargo-pgrx --locked and update your dependencies accordingly.

What's Changed

  • Teach Array how to work with Arrays of arbitrary fixed-sizes that are also pass-by-value by @eeeebbbbrrrr in #1161
  • Simplify and fix some correctness issues with fixed-size byval arrays by @thomcc in #1162

Full Changelog: v0.9.2...v0.9.3

v0.9.2

05 Jun 18:38
da1a67c
Compare
Choose a tag to compare

This is pgrx v0.9.2. It's a minor release fixing a few bugs related to the PgVarlena type and the PostgresEq/Ord/Hash derive macros. It also now allows a #[pg_extern] function to return Result<Option<TableIterator<...>>>.

As always, make sure to cargo install cargo-pgrx --locked and update your Cargo.toml dependencies.

Bug Fixes

  • PgVarlena-based types are now correctly used by #[derive(PostgresEq/Ord/Hash)] by @eeeebbbbrrrr in #1159

There's a new example in pgrx-examples/src/pgvarlena.rs that demonstrates how to take advantage of all the DDL pgrx can generate for this combination of features.

  • Fix parsing bugs with #[pg_extern] in ff89c01

Miscellaneous Changes

New Contributors

Full Changelog: v0.9.1...v0.9.2

v0.9.1

31 May 19:17
fd3f360
Compare
Choose a tag to compare

This is pgrx v0.9.1. It's a minor point release.

What's Changed

  • Add --configure-flag option for cargo pgrx init by @ewencp in #1154

cargo pgrx init can now accept configure flags to pass to each Postgres version it builds. This can be helpful for properly configuring other contrib/ packages that are otherwise installed.

This adds the ability to construct an empty PgHeapTuple from the underlying type Oid. It also marks one of its constructor functions as unsafe. The latter might be considered a breaking API change, but it's such a minor thing that it's not worth a full semver bump.

Full Changelog: v0.9.0...v0.9.1

v0.9.0

26 May 20:27
57e680f
Compare
Choose a tag to compare

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

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

v0.8.4

24 May 22:06
0660850
Compare
Choose a tag to compare

This is pgrx v0.8.4. It fixes a performance regression with the new zero-copy array support added in v0.8.0 along with a bug decoding arrays of Postgres cstrings.

To upgrade, make sure to cargo install cargo-pgrx --locked along with updating the version in your extension Cargo.toml file.

What's Changed

  • PR #1145 - This fixes a performance regression with the new zero-copy arrays and an off-by-one bug with arrays of cstrings. Locally, I'm seeing a roughly 60% improvement over v0.8.3 in iterating large Array<T: FromDatum> values where T is a fixed-size type such as a float8 or i32.

Full Changelog: v0.8.3...v0.8.4