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
andpgx::pg_aggregate
, or theaggregate
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 compatiblepgx
version. (#389)cargo pgx
and thesql-generator
have more observability and improved error handling. Try exploring--verbose
! (#372)cargo pgx
related commands now treat thepgversion
as optional if somepgversion
is part of the extension'sdefault
features. (#402)- You can now have extensions which are
#[no_std]
. Whilepgx
still usesstd
, this can be a partial measure to limiting what an extension (or, for exampleplrust
) might be able to do on a system. (#385) pgx::Internal
has an expanded API likeget_or_insert_default()
. (#419)- Most
pgx
related attribute macros now supportsql = false
,sql = "string"
, orsql = some::func::path
to configure how they generate SQL. (#410, #422) - Nix users will find
lib.buildPgxExtension
in theflake.nix
. (#358, #360, #361)
Other changes
PgBox
acquirednew()
andnew_in_context()
functions. (#421)- The
pg_sys::TimestampTz
type alias now has an SQL mapping. (#400) pgx::memcxt::PgMemoryContexts
related closures now take aFnOnce
, 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 duringcargo pgx
use. (#380) - For
x86_64-unknown-linux-musl
andaarch64-unknown-linux-musl
users, schema generation is now supported. (#362, #365) - For Nix users,
debug
anddoCheck
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!