Releases: pgcentralfoundation/pgrx
v0.0.11
v0.0.9
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
tocargo pgx new <extname>
to automatically create a template Background Worker extension crate - Thanks @jamessewell!
- There's also a new flag named
-
Issue #23:
#[pg_extern]
functions can now return Rust tuples, which translate into an UDF thatRETURNS TABLE (..., ...)
. -
Issue #28:
#[pg_operator]
macro now exists, which works exactly like#[pg_extern]
, but will auto generate theCREATE 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 forpgx::Numeric
- Add ability to create a
pgx::PgTupleDesc
from a compositepgx::pg_sys::Datum
- Add a
--release
flag tocargo pgx run
for interactively testing a release build of your extension cargo pgx run
spawnspsql
usingexecvp()
, 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.
v0.0.8
pgx
v0.0.8 has been released. This is a bugfix and feature release.
New Features
- Issue #18:
#[derive(PostgresType)]
now works for structs that contain borrowed data (ie, they have lifetimes). These are encoded as JSON, whereas fully-owned structs are encoded as CBOR - Issue #19:
pgx
now supports Postgres'bytea
type, which can be represented in Rust as&[u8]
orVec<u8>
. There's also an example for this that demonstrates gzippingbytea
data
Bug Fixes
- Issue #21: Rust's unit type (
()
) is now translated into a Postgresvoid
- Issue #21: Rust's
char
type is now translated into a Postgresvarchar
- Issue #21: Postgres'
"char"
type (note the quotes!) is now translated into a Rusti8
Upgrading
When upgrading to this version, please ensure to run cargo install cargo-pgx
in addition to updating your Cargo.toml
files.
Sponsor Our Work
Please consider sponsoring our work on pgx
. Sponsorships help keep pgx
open-source and actively developed. Thanks for your consideration!
v0.0.7
This is pgx
v0.0.7. The version was bumped from v0.0.3 so that the various dependency crates and the cargo-pgx
subcommand can track with the same version numbers going forward.
This release brings lots of new features to cargo-pgx
, some bugfixes around SPI support, inclusion of Postgres' FDW APIs, and more documenation.
Please make sure to update your Cargo.toml
pgx dependency versions to 0.0.7!
What's New?
-
Significant reworking of the
cargo-pgx
subcommand.- execute
cargo install cargo-pgx
again to upgrade it to v0.0.7. - contains many new command such as 'init', 'run', 'package', 'start/stop/status'. See its README for details, screenshots, and a link to an instructional video
- Regardless of if this is your first time using
pgx
, you now need to runcargo pgx init
at least once - Our hope is that these
cargo-pgx
changes bring major QoL improvements. If you see anything else it needs, please create an issue.
- execute
-
include Postgres' Foreign Data Wrapper API headers in the
pgx::pg_sys
module
Bugfixes
- fix use-after-free bugs with SPI when returning
&str
orPgBox<T>
values
Support Our Work
Please consider sponsoring our work at our GitHub Sponsors Page.