Releases: pgcentralfoundation/pgrx
v0.1.24
This is pgx
v0.1.24. It is a follow-up to the v0.1.23 release which inadvertently broke shared memory support. This release fixes that.
Also note that this will be the last release in the 0.1.x series, as we are finalizing a v0.2.0 release which brings some breaking changes along with PostgreSQL 14 support.
v0.1.23
v0.2.0-beta.1
Features
- The
pgx
SQL generation system has been rewritten! It now uses the proc macro system and has several breaking changes. Please refer to the migration guide below. (#165, #197) - The PostgreSQL
uuid
type is now supported! (#172) cargo pgx test
now accepts an optional testname.cargo pgx test specific::path
works just likecargo test
! (#186)pgx-pg-sys
now suggests you installrustfmt
if you don't have it. (#193)cargo pgx schema
will now emit informational messages if extensionCargo.toml
settings are not what is expected. (#209)cargo pgx test
now has a--workspace
argument matching the equivalent oncargo test
. (#169)
Other changes
- fix: Marked several functions as unsafe as they had undefined behavior when passed invalid pointers. (#210, #216, #217, #223, #224, #226)
- Type
oid
s don't need to be looked up in functions that don't use them. (#168) - Added an aggregate example. (#187)
- Updated many of our dependencies. (#191)
- More documentation has been added to several macros and SQL generation related types. (#192, #158, #219)
- An
articles/
directory now exists in the repo and includes links to different articles written aboutpgx
. (#198) - Document our MSRV (#157)
- Fixed an accidental circular dependency in 0.2.0-beta.0 (unpublished).
Migration Guide
-
Update your
cargo-pgx
:cargo install --force cargo-pgx --version 0.2.0-beta.0
-
In your
Cargo.toml
, setcrate-type
to include"rlib"
andprofile.dev.lto
to be"thin"
:[lib] crate-type = ["cdylib", "rlib"] [profile.dev] lto = "thin"
-
Tell
cargo-pgx
to force update your.cargo/
andsrc/bin
files it needs:cargo pgx schema -f
-
Remove any
sql/*.generated.sql
files, as well as theload-order.txt
. -
For each
sql/*.sql
remaining, insertextension_sql_file!("../sql/that_file.sql");
into yoursrc/lib.rs
-
If the files depend on entities which already exist, you might need to set a
requires
attribute:extension_sql_file!("../sql/that_file.sql", requires = [ dogs::parts::Floof, some_fn, ]);
-
For any
mod floof { fn boop() { todo!() } }
style blocks you were using to infer schema name (making that functionfloof.boop
), decorate the schema with#[pg_schema]
:#[pg_schema] mod floof { fn boop() { todo!() } }
-
For any functions have a custom
sql
block for (like below), update that to usepgxsql
now:/// ```sql <-- Change this to `pgxsql` /// CREATE OR REPLACE FUNCTION .... /// ``` #[pg_extern] fn dot_dot_dot() { todo!() }
-
Run
cargo pgx schema
again!
If you have any trouble, try running cargo pgx schema -v
and investigating the output. We made sure to update the cargo doc
output of pgx
with updated usage for the various macros and derives, they might have some advice, too.
You can ask us questions via issues here or Discord if you get stuck.
Thanks!
Thanks to @JLockerman (from @timescale) & @kpumuk for contributions! Also thanks to our early testers @rustprooflabs and @comdiv.
v0.1.22
v0.1.21
pgx
v0.1.21 is a minor feature release with the following features:
Changes
- aarch64 support was added (#127)
- add Nix flake (#124)
cargo-pgx pgx init
doesinitdb
(#123)- Improve handling of feature flags (#118)
- Allow overriding function names and returning schema-qualified type (#117)
- update dependencies (#122).
- (docs) Add caveat about reconnecting after updating extension (#116)
Other Changes
- (
cargo-pgx
) on init, lazy fetch version list (#119)
To upgrade, please run:
$ cargo install cargo-pgx --version 0.1.21
Also, make sure to update your Cargo.toml dependencies.
Thanks!
Thanks to @JLockerman from @timescale for the PRs. And of course special thanks to @Hoverbear for her work on this release!
v0.1.20
This is pgx
v0.1.20. It is a minor feature release adding Rust bindings for the Postgres headers related to gin
and gist
indexes.
To upgrade, please run:
$ cargo install cargo-pgx
Also make sure to update your Cargo.toml dependencies.
Sponsor Our Work
Please consider sponsoring us so we can continue building cool things like pgx
! Thank you for your consideration!
v0.1.19
This is pgx
v0.1.19. It is a minor feature release which adds a new cargo pgx
subcommand called dump-schema
, which simply writes the entire generates extension schema.sql file to a specified directory.
To upgrade, please run:
$ cargo install cargo-pgx
Also make sure to update your Cargo.toml dependencies.
Sponsor Our Work
Please consider sponsoring us so we can continue building cool things like pgx
! Thank you for your consideration!
v0.1.18
This is pgx
v0.1.18. It is a minor feature release where cargo pgx init
can now automatically discover all supported versions of Postgres from postgresql.org instead of hardcoding specific version numbers.
Additionally, PR #78 was implemented, which teaches pgx
how to use cargo metadata
to determine the target
directory.
To upgrade, please run:
$ cargo install cargo-pgx
Also make sure to update your Cargo.toml dependencies.
If you'd like to update your pgx-managed Postgres installations to the latest point-releases, simply run cargo pgx init
after doing the above.
Thanks!
Thanks for the PRs everyone! Keep 'em coming!
Sponsor Our Work
Please consider sponsoring us so we can continue building cool things like pgx
! Thank you for your consideration!
v0.1.17
This is pgx
v0.1.17. It fixes cargo pgx init
(and its various argument forms) on MacOS.
To upgrade, please run:
$ cargo install cargo-pgx
Also make sure to update your Cargo.toml dependencies.
Sponsor Our Work
Please consider sponsoring us so we can continue building cool things like pgx
! Thank you for your consideration!
v0.1.16
This is pgx
v0.1.16. It adds a number of new headers to support Foreign Data Wrapper development.
To upgrade, please run:
$ cargo install cargo-pgx
Also make sure to update your Cargo.toml dependencies.
Sponsor Our Work
Please consider sponsoring us so we can continue building cool things like pgx
! Thank you for your consideration!