Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Release 0.4.0, a feature release with breaking changes!
Release notes:
v0.4.0
This release reworks the SQL generation process present in 0.2.x and 0.3.x, resulting in approximately 50% faster linking times for most commands.
The usability of
#[pgx(sql = some_func)]
has also improved, as we are now invoking these functions from the shared object itself, instead of some separate binary.Upgrading
This release requires some manual intervention for all users, as we have updated the SQL generation process. We discovered a new (significantly faster and more safe) way to generate SQL that doesn't require the
sql-generator
binary or linker scripts.Additionally, only users of
#[pg_extern(sql = some_func)]
(and thus using thepgx::datum::sql_entity_graph
) should be aware thatpgx::datum::sql_entity_graph
was merged withpgx_utils::sql_entity_graph
and is available atpgx::utils::sql_entity_graph
now.Steps to upgrade:
Please make sure to run
cargo install cargo-pgx --version 0.4.0-beta.0
and update all thepgx
extensionCargo.toml
'spgx*
versions to0.4.0-beta.0
.Then:
.cargo/pgx-linker-script.sh
,src/bin/sql-generator.rs
..cargo/config
with:Cargo.toml
:What's Changed
cargo pgx schema
now: (cargo-pgx
can generate schemas #441, Bump semver from 1.0.5 to 1.0.6 #446, cargo-pgx schema to stdout by default #465, Derive symbols from postmaster not pgx-pg-sys #478, Add note in cargo pgx new for workspace users #471, Hash the postmaster to support in place upgrades #480,cargo-pgx
can generate schemas #441)--message-format=json
on somecargo
invocations and captures that output.postmaster
binary (found viapg_config
).dlopen
s that 'stub'.dlopen
s the extension.pgx_utils::sql_entity_graph::PgxSql
builders as thesql-generator
used to.cargo pgx
commands now support the--package
arg matchingcargo
's.Please note unlike
cargo
,cargo pgx
does not support multiple--package
args at this time. (Workspace support #475 )pgx::datum::sql_entity_graph
andpgx_utils::sql_entity_graph
are merged and present inpgx_utils::sql_entity_graph
together. (cargo-pgx
can generate schemas #441)pgx_utils
is now exported from atpgx::utils
, this is primarily to exposepgx_utils::sql_entity_graph
without requiring users havepgx_utils
in theirCargo.toml
. (cargo-pgx
can generate schemas #441)sql-generator
binary,.cargo/pgx-linker-script.sh
and related.cargo/config
settings are no longer needed. The old.cargo/config
from 0.1.2x is back. (cargo-pgx
can generate schemas #441)pgx_graph_magic!()
now expands with__pgx_source_only_sql_mappings
and__pgx_typeid_sql_mappings
symbols, allowingcargo-pgx
to get the appropriate SQL mappings. (cargo-pgx
can generate schemas #441)cargo pgx test
andcargo pgx install
had several changes to make them more appropriately and cleanly capture and pass build data for this new process. (cargo-pgx
can generate schemas #441)sql_graph_entity
related functions got a#[doc(hidden)]
attribute to clean up their docs. (cargo-pgx
can generate schemas #441)RUST_LOG
env vars get correctly passed inpgx test
. (cargo-pgx
can generate schemas #441)pgx-pg-sys
now only generates bindings it needs, instead of bindings for all postgres verisons. (Generate pgx-pg-sys bindings based on features #455)pgx-parent
crate was removed, thepgx-examples
directory members are now workspace members, and the workspaces usesresolver = "2"
. (Unify workspace #456)pgx-examples
no longer point outside the pgx directory then traverse back in. (Respect sandbox boundaries in pgx-examples #462)pgx_pg_sys
:tsearch/ts_public.h
andtssearch/ts_utils.h
(Expose tsearch/ts_public.h and tsearch/ts_utils.h #464)buffile.h
(Include buffile in pgx-pg-sys #476)optimizer/appendinfo.h
(Add appendinfo.h and regenerate bindings #479)initdb
ortar
(Improve error message when initdb/tar missing #484)singleStep = false
, improving rebuild speed, we also tweaked the Nix CI samples. (Allow non singlestep nix builds #474, Update the nix template CI with the one from pl/Rust #485)pgx-tests
failing ondoc.rs
. (Fix pgx-tests on docs.rs #468)