Skip to content

Releases: pgcentralfoundation/pgrx

v0.11.1

27 Nov 22:43
733827a
Compare
Choose a tag to compare

Hello. Welcome to pgrx v0.11.1, a bugfix release that hopefully addresses a very annoying persistent problem for users, especially ones that were trying to use pgrx with Postgres 16! My (@workingjubilee)'s changes in b992f55 now steer bindgen towards including the exact compiler-header directory that we require, instead of relying on clang-sys to guess the right directory in ways that can go horribly wrong. Unfortunately, this may make our build step more brittle in certain cases. Please report issues as they arise, so that we can continue to refine our build system, and eventually fix this in bindgen proper!

This new behavior can still be disabled by setting PGRX_BINDGEN_NO_DETECT_INCLUDES, as it is still a form of autodetecting includes, but if this release fixes your build that was previously relying on that or any other easily-removed hack, please let us know!

Also, thanks to @LuminousMonkey, you can now use pgrx on illumos, an operating system descended from Solaris, with no changes to your source code!

Full Changelog: v0.11.0...v0.11.1

v0.11.0

11 Oct 19:39
6bbe8ff
Compare
Choose a tag to compare

Welcome to pgrx v0.11.0. It's a new "major" release with some new features, a faster "build.rs", and some bugfixes.

As always, please update by running cargo install cargo-pgrx --version 0.11.0 --locked and update your extension crate Cargo.toml files accordingly.

What's Changed

Faster Buildings

@workingjubilee did some work to improve build times. As measured on their computer against cargo check, it's roughly a quarter faster. In doing so, the generated "bindings.rs" files look a little different and our "build.rs" has been cleaned up a bit.

Pure Rust implementation for PgList

@workingjubilee did a tremendous amount of work creating a proper wrapper around Postgres' internal List type, called PgList.

Some background here is that we intend to add the "dynamic function call" work (see below) to PL/Rust. In doing that work, use of Postgres' List type is pretty important and pgrx' existing implementation was a) mostly in the cshim, and b) just not very-good-and-sound. Considering (b) and also that PL/Rust isn't able to use anything from pgrx' chsim (a), @workingjubilee set out to make a proper Rust wrapper/implementation of Postgres' List type.

Note: As part of this, NodeTag is now a proper enum, which requires a small migration which is mostly satisfied by a regex-based find-replace of NodeTag_T_[A-Za-z]* with NodeTag::T_$1.

More Bindings

We've added more Postgres internals headers to the pgrx-pg-sys crate:

Dynamic Function Calling

pgrx now allows calling any SQL-defined function (ie, via CREATE FUNCTION) in a (mostly) Rusty way with the new dynamic function calling support. Some documentation around this feature can be found in the sources, here and in the unit tests.

As mentioned above, this feature will be exposed in PL/Rust soon. However, it's still an extremely powerful feature for pure pgrx extensions as it allows calling another function directly, with runtime type safety checks, without incurring any Spi overhead.

cargo pgrx install --sudo

Sometimes cargo-pgrx install can be tough to work with if targeting a package manager-managed Postgres installation as the various extension directories are owned by root. cargo pgrx install --sudo fixes that by copying the files as root. The build, which is typically done as a regular user, is still run by that user -- only the file copying is run with sudo.

Miscellaneous Work

Thanks!

Thanks to all the contributors! We appreciate the PRs and testing. And we especially like hearing about what you're building with pgrx.

Full Changelog: v0.10.2...v0.11.0

v0.10.2

19 Sep 22:15
Compare
Choose a tag to compare

Welcome to pgrx v0.10.2!

In pgrx v0.10.0, as part of a refactoring step in order to make refactoring easier in the future, without things like losing track of random functions, we... omitted a few functions! These depended on the cshim, but were not direct bindings, themselves. Oops. They're back now in pgrx::pg_sys.

cargo pgrx works now for Postgres 16 on macOS

Installing extensions on macOS for Postgres 16 had problems due to recent changes to Postgres defaults. We have fixed this and expanded our test coverage for macOS to reduce the odds of this happening in the future, thanks to @bayandin in #1300

composites compose better

There were some problems with composite types and arrays, and specifically arrays of composite types in composite types. These are the sorts of things that cause edge cases in PgHeapTuple. They should now be appropriately supported, however, thanks to @eeeebbbbrrrr in #1303

#[pg_schema] will enable your bad ideas

The following should now work appropriately:

#[pgrx::pg_schema]
mod pg_catalog {

It does what you think it does. Since this can affect a global namespace in a way that makes it much easier to conflict with other extensions, it is best to avoid this. However, it is the sort of bad idea that extensions which "take over" the Postgres host to extensively redefine the host's capabilities, like ZomboDB does, may have to resort to in order to accomplish their goal. Thanks to @eeeebbbbrrrr in #1302

Keep the bug reports coming

And thank you for reporting your issues!

v0.10.1

14 Sep 17:37
Compare
Choose a tag to compare

This is pgrx v0.10.1. It includes support for Postgres v16 and since pg16 is now released, cargo pgrx init will now be able to download the latest version.

As always, please install the latest cargo-pgrx with cargo install cargo-pgrx --version 0.10.1 --locked and update your Cargo.toml dependencies.

What's Changed

#1295: Support the official Postgres v16 release
#1294: Add WAL recovery header bindings for pg15 and pg16

Full Changelog: v0.10.0...v0.10.1

v0.10.0

05 Sep 19:46
3d1c8e3
Compare
Choose a tag to compare

This is the final release of v0.10.0. Thanks everyone for the beta testing, pull requests, issues, and patience.

As always, install cargo-pgrx with cargo install cargo-pgrx --locked and update your extension Cargo.toml files to use the 0.10.0 pgrx dependencies.

This release includes support for Postgres 16RC1. Support for the previous betas has been removed. As such, a fresh cargo pgrx init is required.

What's Changed Since v0.10.0-beta.4

New Contributors

Changelog: v0.10.0-beta.4...v0.10.0


v0.10.0's full set of changes throughout the entire beta period are:

New Contributors

Full Changelog: v0.9.8...v0.10.0

v0.10.0-beta.4

23 Aug 02:21
1592952
Compare
Choose a tag to compare
v0.10.0-beta.4 Pre-release
Pre-release

The fifth beta release of 0.10.0!

  • #[pg_test]-compatible proptest support in #1258 courtesy of moi
  • PostgresEq (#1261) and PostgresOrd (#1262) now explicitly require their "base" Rust traits, which may hypothetically break some impls, but in exchange your equality implementations are now presumed to be commutative.
  • Work on improving/simplifying/optimizing our SPI continues, with @vrmiguel contributing some polish to Datum preparation in #1256
  • We have been finding some extra-spicy edge cases in how PGRX interacts with a continuously-operational Postgres installation which might feature extensions being installed and reinstalled lately! @Sasasu fixed at least one core-dump-causing case from cargo pgrx install in #1263

New Contributors

Full Changelog: v0.10.0-beta.3...v0.10.0-beta.4

v0.10.0-beta.3

10 Aug 15:57
c76c7e2
Compare
Choose a tag to compare
v0.10.0-beta.3 Pre-release
Pre-release

This is pgrx v0.10.0-beta.3. The 4th beta in our series that includes Postgres 16 support. In this release, Postgres 16 support has been updated to pg16beta3.

To work with this beta please install cargo-pgrx with cargo install cargo-pgrx --version 0.10.0-beta.3 --locked and update the pgrx dependency versions in any extension crates. Then make sure to add a "pg16" feature flag.

What's Changed

Usability

  • Derive Clone for Inet by @JelteF in #1251
  • Ensure bindgen gets all the cppflags it needs (on macOS, anyway) by @thomcc in #1247

Documentation

Internal

Full Changelog: v0.10.0-beta.2...v0.10.0-beta.3

v0.10.0-beta.2

01 Aug 19:46
d3a3901
Compare
Choose a tag to compare
v0.10.0-beta.2 Pre-release
Pre-release

This is the third beta in the pgrx v0.10.x series. It contains a number of soundness fixes, better error handling, more testing, and other general code cleanup.

Soundness Issues

CI and general Testing Support

General Improvements

Improved Error Reporting

Additional Postgres Headers

Internal Code Organization

Postgres 16-motivated Changes

  • Add a workaround for the pg16/homebrew/icu4c situation by @thomcc in #1206

General Project Stuff

New Contributors

Full Changelog: v0.10.0-beta.1...v0.10.0-beta.2

v0.10.0-beta.1

14 Jul 01:45
Compare
Choose a tag to compare
v0.10.0-beta.1 Pre-release
Pre-release

Welcome to pgrx v0.10.0-beta.1. The second in our series to add Postgres 16 support.

This release contains a few bugfixes around arrays of certain types and compile-time Spi API soundness. It also improves the output of cargo pgrx test test failures.

To evaluate this release please run cargo install cargo-pgrx --version 0.10.0-beta.1 --locked && cargo pgrx init. And make sure to update your extension crate dependencies as well, adding a corresponding pg16 line to the [features] block.

What's Changed

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

v0.9.8

14 Jul 00:51
Compare
Choose a tag to compare

This is pgrx v0.9.8. It is a minor release that fixes some soundness problems with Spi, improves cargo pgrx test test failure output, fixes a soundness bug with arrays of pg_sys::Point and pg_sys::BOX, and introduces some additional testing.

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

While we're moving forward with the v0.10.0 line that includes Postgres 16 beta support we've fixed some other important bugs along the way and felt it prudent to add to the 0.9.x releases.

What's Changed

  • PRs #1204, and #1185 - These improve general "roundtrip" testing for all pgrx-supported datatypes and in doing so uncovered and then fixed (in #1185) a bug with Array<pg_sys::Point> and Array<pg_sys::BOX>.

  • PR #1209 fixes lifetime issues with the safe Spi API. Previously, it was possible for SpiTupleTable and PreparedStatement objects to escape the Spi::connect(|c| ...) scope, causing those objects to have been freed by Postgres but still assumed valid by Rust. If you had any Spi-related code that did this, it will no longer compile. This was the intent for the Spi API wrapper from the beginning, but escaped our usability testing.

  • PR #1190 is from first-time contribution from @Sasasu. It fixes an over-read of the "FcInfo" function arguments array for Postgres versions 12-15. In practice pgrx would never had read more than the actual array, but technically it could have without a bounds check.

  • PR #1191 - This asserts that array-walking is properly aligned and removes an erroneous assert causing construction of certain types of arrays to raise an ERROR.

  • PR #1203 improves the cargo pgrx test output for individual tests that fail. In all cases now it'll output generic postgres log messages, postgres log messages generated by the failing test, and the error message received by the client. This should help to improve general debugging.

  • PR #1183 cleans up generic filesystem error handling. This is mostly specific to the cargo-pgrx binary but does touch pgrx-pg-sys/build.rs too.

Full Changelog: v0.9.7...v0.9.8