Skip to content

Releases: pgcentralfoundation/pgrx

v0.1.9

26 Dec 18:22
Compare
Choose a tag to compare

This is pgx v0.1.9. It is a minor release that adds a function wrapper around Postgres heap_getattr macro.

To upgrade, please ensure to run:

$ cargo install cargo-pgx

And don't forget to update your own Cargo.toml dependency versions.

New Macros as Rust functions

  • pgx::heap_getattr_raw(), which wraps the heap_getattr macro

Please Sponsor Our Work

While a labor of love, pgx development is not without cost. Please consider sponsoring our work to offset those costs. All sponsorship tiers are appreciated.

v0.1.8

21 Dec 00:36
Compare
Choose a tag to compare

This is pgx v0.1.8. It is a minor release that adds a few more Postgres header bindings and ports a few Postgres macros.

To upgrade, please ensure to run:

$ cargo install cargo-pgx

And don't forget to update your own Cargo.toml dependency versions.

New Postgres Headers

  • added pg_config.h
  • added access/heapam.h
  • added storage/bufmgr.h

New Macros as Rust functions

  • pg_sys::HeapTupleHeaderIsHeapOnly
  • pg_sys::HeapTupleHeaderIsHotUpdated
  • pg_sys::HeapTupleHeaderXminInvalid
  • pg_sys::BufferGetPage
  • pg_sys::BufferGetBlock
  • pg_sys::BufferIsLocal

Please Sponsor Our Work

While a labor of love, pgx development is not without cost. Please consider sponsoring our work to offset those costs. All sponsorship tiers are appreciated.

v0.1.7

18 Dec 23:38
Compare
Choose a tag to compare

This is pgx v0.1.7. It is a minor release that fixes a few edge-case bugs with cargo-pgx and also adds a few more Postgres header bindings.

To upgrade, please run:

$ cargo install cargo-pgx

And don't forget to update your own Cargo.toml dependency versions.

Bugs Fixed:

  • Issue #67: Provide better error messages when an extension name doesn't contain valid characters
  • Issue #68: Provide better error messages when the ./sql directory can't be found

New Postgres Headers

  • added commands/comment.h
  • added rewrite/rewriteHandler.h

Please Sponsor Our Work

While a labor of love, pgx development is not without cost. Please consider sponsoring our work to offset those costs. All sponsorship tiers are appreciated.

Also, feel free to join our Discord: https://discord.gg/QN2AmFV

v0.1.6

05 Dec 22:39
Compare
Choose a tag to compare

This is pgx v0.1.6. It's a minor release that adds a few more Postgres header files to its bindings.

It also improves the SpiHeapTupleData type so that it can be indexed by field name or field number.

As always, make sure to update cargo-pgx via:

$ cargo install cargo-pgx

Please Sponsor Our Work

Developing pgx is quite a lot of work. We appreciate your sponsorships to help keep us motivated and moving pgx forward.

v0.1.5

19 Nov 22:28
Compare
Choose a tag to compare

This is pgx v0.1.5. It is a minor release to fix some bugs and performance issues.

As always, in addition to updating your Cargo.toml versions, please make sure to run the following to upgrade to this version:

$ cargo install cargo-pgx

Changes

  • bf990c1: The input/output functions for custom types are now marked PARALLEL SAFE
  • Issue #58: pgx no longer sets a search_path for all created functions. If your function needs a search_path, there's a new #[search_path(...)] macro you can apply to that function. It's applicable to #[pg_extern], #[pg_operator] and #[pg_test]
  • 8549258: Fix a few memory leaks related to converting jsonb Datums
  • 8549258: Add a new variant to PgMemoryContexts along with a few other helper functions

Sponsor Our Work

Please consider sponsoring pgx' development by clicking here. We greatly appreciate it!

v0.1.4

16 Nov 03:26
Compare
Choose a tag to compare

This is pgx v0.1.4. It's a follow-up to v0.1.3 so that the docs build on docs.rs and that cargo pgx test correctly works.

This is somewhat of a breaking release in that it requires you to update your Cargo.toml files to define more features, and it also might necessitate some minor API changes within your code.

To upgrade, you need to run:

$ cargo install cargo-pgx

If you want Postgres 13 support, you'll then want to run:

$ cargo pgx init

New Features

  • Now also supports Postgres v13
  • cargo-pgx and the build system have been updated to not require multiple versions of Postgres be downloaded/managed. If you only need support for one or more specific versions of Postgres, you can specify those versions to cargo pgx init (see the cargo-pgx docs)
  • a new trait pgx::pg_sys::AsPgCStr has been added to make it easy to convert &str and String types to palloc'd char *s.

Breaking Changes

  • For any extensions you might have that used earlier versions of pgx, you'll need to update the [features] section in their Cargo.toml file to include the following:
[features]
default = [ "pg12" ]  # or whatever you'd prefer for your extension
pg10 = [ "pgx/pg10", "pgx-tests/pg10" ]
pg11 = [ "pgx/pg11", "pgx-tests/pg11" ]
pg12 = [ "pgx/pg12", "pgx-tests/pg12" ]
pg13 = [ "pgx/pg13", "pgx-tests/pg13" ]
pg_test = [ ]

Basically, the change here is that that pgx-tests crate now requires a Postgres version feature flag. This is a result of a change to how Postgres 13 describes extension function compatibility via pgx's pg_module_magic!() macro.

  • If you implement the pgx::PgHooks trait, the planner_hook() function's second argument is now: query_string: *mut std::os::raw::c_char. In Postgres <13, this will be a null pointer. In Postgres 13+, this will be a "char *" to the query string being planned.

v0.1.3

16 Nov 03:02
Compare
Choose a tag to compare

This is pgx v0.1.3. It's a follow-up to v0.1.2 so that the docs build on docs.rs.

This is somewhat of a breaking release in that it requires you to update your Cargo.toml files to define more features, and it also might necessitate some minor API changes within your code.

To upgrade, you need to run:

$ cargo install cargo-pgx

If you want Postgres 13 support, you'll then want to run:

$ cargo pgx init

New Features

  • Now also supports Postgres v13
  • cargo-pgx and the build system have been updated to not require multiple versions of Postgres be downloaded/managed. If you only need support for one or more specific versions of Postgres, you can specify those versions to cargo pgx init (see the cargo-pgx docs)
  • a new trait pgx::pg_sys::AsPgCStr has been added to make it easy to convert &str and String types to palloc'd char *s.

Breaking Changes

  • For any extensions you might have that used earlier versions of pgx, you'll need to update the [features] section in their Cargo.toml file to include the following:
[features]
default = [ "pg12" ]  # or whatever you'd prefer for your extension
pg10 = [ "pgx/pg10", "pgx-tests/pg10" ]
pg11 = [ "pgx/pg11", "pgx-tests/pg11" ]
pg12 = [ "pgx/pg12", "pgx-tests/pg12" ]
pg13 = [ "pgx/pg13", "pgx-tests/pg13" ]
pg_test = [ ]

Basically, the change here is that that pgx-tests crate now requires a Postgres version feature flag. This is a result of a change to how Postgres 13 describes extension function compatibility via pgx's pg_module_magic!() macro.

  • If you implement the pgx::PgHooks trait, the planner_hook() function's second argument is now: query_string: *mut std::os::raw::c_char. In Postgres <13, this will be a null pointer. In Postgres 13+, this will be a "char *" to the query string being planned.

v0.1.2

16 Nov 02:37
Compare
Choose a tag to compare

This is pgx v0.1.2. This is somewhat of a breaking release in that it requires you to update your Cargo.toml files to define more features, and it also might necessitate some minor API changes within your code.

To upgrade, you need to run:

$ cargo install cargo-pgx

If you want Postgres 13 support, you'll then want to run:

$ cargo pgx init

New Features

  • Now also supports Postgres v13
  • cargo-pgx and the build system have been updated to not require multiple versions of Postgres be downloaded/managed. If you only need support for one or more specific versions of Postgres, you can specify those versions to cargo pgx init (see the cargo-pgx docs)
  • a new trait pgx::pg_sys::AsPgCStr has been added to make it easy to convert &str and String types to palloc'd char *s.

Breaking Changes

  • For any extensions you might have that used earlier versions of pgx, you'll need to update the [features] section in their Cargo.toml file to include the following:
[features]
default = [ "pg12" ]  # or whatever you'd prefer for your extension
pg10 = [ "pgx/pg10", "pgx-tests/pg10" ]
pg11 = [ "pgx/pg11", "pgx-tests/pg11" ]
pg12 = [ "pgx/pg12", "pgx-tests/pg12" ]
pg13 = [ "pgx/pg13", "pgx-tests/pg13" ]
pg_test = [ ]

Basically, the change here is that that pgx-tests crate now requires a Postgres version feature flag. This is a result of a change to how Postgres 13 describes extension function compatibility via pgx's pg_module_magic!() macro.

  • If you implement the pgx::PgHooks trait, the planner_hook() function's second argument is now: query_string: *mut std::os::raw::c_char. In Postgres <13, this will be a null pointer. In Postgres 13+, this will be a "char *" to the query string being planned.

v0.0.18

10 Nov 20:14
Compare
Choose a tag to compare

This is pgx v0.0.18. It is a minor bugfix release.

As always, please make sure to run:

$ cargo install cargo-pgx

to upgrade to this version.

Changes

  • Fix a memory leak with PgVarlena when constructed from a non-toasted datum
  • pgx now generates Display implementations for most of the internal Postgres pg_sys::Node types using pg_sys::nodeToString()
  • cargo pgx new no longer initializes the extension directory as a git repo. It does, however, continue to generate a .gitignore file
  • Fix a bug with build.rs where it wasn't properly building the c-shim
  • #[no_mangle] is now required on the "background_worker_main" function when using BgWorker support
  • build.rs now generates a graph of Postgres struct inheritance, opening up the possibility for future programmatic transformations

Thanks!

Thanks to everyone that contributed a PR or filed a bug report. Also, thanks to our sponsors. Sponsorship helps keep us motivated, so please consider sponsoring us!

v0.0.17

18 Oct 20:34
Compare
Choose a tag to compare

This is pgx v0.0.17. It is a minor bugfix and cleanup release.

As always, make sure to run: cargo install cargo-pgx to update cargo-pgx to this version and also update your dependency versions.

Changes

  • panic!() locations are now properly reported (again)
  • Bindings for Postgres' parser.h
  • cleanup build.rs to avoid extra lexing and i/o during builds
  • cargo pgx --version now reports its version number
  • minor type-o fixes

Thanks!

Thanks for the Pull Requests, everyone!