Skip to content

v0.3.0

Compare
Choose a tag to compare
@Hoverbear Hoverbear released this 09 Feb 21:58
· 598 commits to master since this release
cda8838

Upgrading

Please make sure to run cargo install cargo-pgx and update all the pgx extension Cargo.toml's pgx*versions to 0.3.0.

We do not expect users to require additional actions on upgrade, but we recommend any usage of the pgxsql be converted to use the new sql = "some string" available on the macros. We expect pgxsql support to be removed in the future, before 1.0.0.

Features

  • Aggregates are now supported. Explore the Rustdocs of pgx::Aggregate and pgx::pg_aggregate, or the aggregate example to learn more. (#230, #406, #418, #428)
  • cargo pgx has a new coat of paint as Clap was upgraded to 3.0. (#368)
  • cargo pgx will now do some validation that it is being run on a crate which uses a compatible pgx version. (#389)
  • cargo pgx and the sql-generator have more observability and improved error handling. Try exploring --verbose! (#372)
  • cargo pgx related commands now treat the pgversion as optional if some pgversion is part of the extension's default features. (#402)
  • You can now have extensions which are #[no_std]. While pgx still uses std, this can be a partial measure to limiting what an extension (or, for example plrust) might be able to do on a system. (#385)
  • pgx::Internal has an expanded API like get_or_insert_default(). (#419)
  • Most pgx related attribute macros now support sql = false, sql = "string", or sql = some::func::path to configure how they generate SQL. (#410, #422)
  • Nix users will find lib.buildPgxExtension in the flake.nix. (#358, #360, #361)

Other changes

  • PgBox acquired new() and new_in_context() functions. (#421)
  • The pg_sys::TimestampTz type alias now has an SQL mapping. (#400)
  • pgx::memcxt::PgMemoryContexts related closures now take a FnOnce, this makes them considerably more flexible as they can capture their environment. (#390)
  • pgx-pg-sys should hopefully be able to build on Docs.rs! (#386)
  • default!() macros can now handle negative values. (63f5e6e)
  • The new cargo pgx schema --skip-build flag uses existing artifacts. (#255)
  • @CARGO_VERSION@ in the .control file is now supported in the SQL generation. (#409)
  • Fixed some help text in cargo pgx init. (https://github.com/zombodb/pgx/pull/415)\
  • For users who already have PGUSER set, it was previously possible to encounter some issues during cargo pgx use. (#380)
  • For x86_64-unknown-linux-musl and aarch64-unknown-linux-musl users, schema generation is now supported. (#362, #365)
  • For Nix users, debug and doCheck are now supported. (#349, #401)
  • For Mac Nix users, glibc was broken, it's no longer include it on Mac. (#335)
  • For Mac ARM users, cargo pgx will now handle removing libraries when needed due to code-signing. (#333, #420)
  • For CentOS 7 or other older-distro users, some problems were noted with GCC 4. (#387)
  • General dependency updates and lint fixing. (#339, #364, #405, #414)

Thanks!

Thanks to @JamesGuthrie (from @timescale), @bitwalker (from @timescale), @robins , and @volks73 for their contributions!