Skip to content

v0.11.0

Compare
Choose a tag to compare
@eeeebbbbrrrr eeeebbbbrrrr released this 11 Oct 19:39
· 325 commits to develop since this release
6bbe8ff

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