Skip to content

v0.0.9

Compare
Choose a tag to compare
@eeeebbbbrrrr eeeebbbbrrrr released this 03 Aug 17:31
· 1022 commits to master since this release

This is pgx v0.0.9. It is a bugfix and new feature release. Primarily, it brings support for safely creating Postgres Background Workers.

New Features

  • PRs #5 & #26: Background worker support. See pgx-examples/bgworker for an example.

    • There's also a new flag named --bgworker to cargo pgx new <extname> to automatically create a template Background Worker extension crate
    • Thanks @jamessewell!
  • Issue #23: #[pg_extern] functions can now return Rust tuples, which translate into an UDF that RETURNS TABLE (..., ...).

  • Issue #28: #[pg_operator] macro now exists, which works exactly like #[pg_extern], but will auto generate the CREATE OPERATOR DDL for you. This is useful when defining operators for custom data types. See pgx-examples/operators.

  • PR #27: cargo pgx init now honors http proxy settings from your environment. Thanks @diegopy!

  • PR #30: cargo pgx start <PGVER> now specifies the "unix_socket_directories" when starting Postgres, which is simply ~/.pgx/. Thanks @jamessewell!

Other Changes/Fixes

  • Properly detoast arrays. This was a regression from v0.0.8
  • Add a FromDatum implementation for pgx::Numeric
  • Add ability to create a pgx::PgTupleDesc from a composite pgx::pg_sys::Datum
  • Add a --release flag to cargo pgx run for interactively testing a release build of your extension
  • cargo pgx run spawns psql using execvp(), which means it'll properly handle, among other things, ^C
  • Ensure SPI_finish() always gets called, even in the face of errors/panics
  • Fix PgTryResult::unwrap_or()/unwrap_or_else() to call Postgres' FlushErrorState()
  • Make GitHubActions build much faster

Sponsor our Work

Please consider sponsoring our work on pgx (and ZomboDB, by choosing a sponsorship tier. Your sponsorship, at any tier, is greatly appreciated and helps keep pgx and ZomboDB free and actively developed!

Thanks!

Thanks to all y'all that have been using pgx, reporting issues, and especially submitting pull requests.