-
-
Notifications
You must be signed in to change notification settings - Fork 263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Release pgrx 0.12.0-alpha.1 #1598
Merged
workingjubilee
merged 4 commits into
pgcentralfoundation:develop
from
workingjubilee:prepare-v0.12.0-alpha.1
Mar 1, 2024
Merged
Release pgrx 0.12.0-alpha.1 #1598
workingjubilee
merged 4 commits into
pgcentralfoundation:develop
from
workingjubilee:prepare-v0.12.0-alpha.1
Mar 1, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Also consolidate a number in the workspace's Cargo.toml.
usamoi
pushed a commit
to tensorchord/pgrx
that referenced
this pull request
Mar 6, 2025
Welcome to pgrx 0.12.0-alpha.1! Say the magic words with me! ```shell cargo install cargo-pgrx --locked --version 0.12.0-alpha.1 ``` # Breaking Changes ## No more dlopen! Perhaps the most exciting change this round is @usamoi's contribution in pgcentralfoundation#1468 which means that we no longer perform a `dlopen` in order to generate the schema. The cost, such as it is, is that your pgrx extensions now require a `src/bin/pgrx_embed.rs`, which will be used to generate the schema. This has much less cross-platform issues and will enable supporting things like `cargo binstall` down the line. It may be a bit touchy on first-time setup for transitioning older repos. If necessary, you may have to directly add a `src/bin/pgrx_embed.rs` and add the following code (which should be the only code in the file, though you can add comments if you like?): ```rust ::pgrx::pgrx_embed!(); ``` Your Cargo.toml will also want to update its crate-type key for the library: ```toml [lib] crate-type = ["cdylib", "lib"] ``` ## Library Code - pgrx-pg-sys will now use `ManuallyDropUnion` thanks to @NotGyro in pgcentralfoundation#1547 - VARHDRSZ `const`s are no longer `fn`, thanks to @workingjubilee in pgcentralfoundation#1584 - We no longer have `Interval::is_finite` since pgcentralfoundation#1594 - We translate more `*_tree_walker` functions to the same signature their `*_impl` version in Postgres 16 has: pgcentralfoundation#1596 - Thanks to @eeeebbbbrrrr in pgcentralfoundation#1591 we no longer have the `pg_sql_graph_magic!()` macro, which should help with more things in the future! # What's New We have quite a lot of useful additions to our API: - `SpiClient::prepare_mut` was added thanks to @XeniaLu in pgcentralfoundation#1275 - @usamoi also contributed bindings subscripting code in pgcentralfoundation#1562 - For `#[pg_test]`, you have been able to use `#[should_panic(expected = "string")]` to anticipate a panic that contains that string in that test. For various reasons, `#[pg_test(error = "string")]` is much the same. Now, you can also use `#[pg_test(expected = "string")]`, in the hopes that is easier to stumble across, as of pgcentralfoundation#1570 ## `Result<composite_type!("..."), E>` support - In pgcentralfoundation#1560 @NotGyro contributed support for using `Result<composite_type!("Name"), E>`, as a case that had not been handled before. ## Significantly expanded docs Thanks to @rjuju, @NotGyro, and @workingjubilee, we now have significantly expanded docs for cargo-pgrx and pgrx in general. Some of these are in the API docs on https://docs.rs or the READMEs, but there's also a guide, now! It's not currently published, but is available as an [mdbook](https://github.com/rust-lang/mdBook) in the repo. Some diagnostic information that is also arguably documentation, like comments and the suggestion to `cargo install`, have also been improved, thanks to @workingjubilee in - pgcentralfoundation#1579 - pgcentralfoundation#1573 ## `#[pg_cast]` An experimental macro for a `CREATE CAST` was contributed by @xwkuang5 in pgcentralfoundation#1445! ## Legal Stuff Thanks to @the-kenny in pgcentralfoundation#1490 and @workingjubilee in pgcentralfoundation#1504, it was brought to our attention that some dependencies had unusual legal requirements. So we fixed this with CI! We now check our code included into pgrx-using binaries is MIT/Apache 2.0 licensed, as is common across crates.io, using `cargo deny`!. The build tools will have more flexible legal requirements (partly due to the use of Mozilla Public License code in rustls). # Internal Changes Many internal cleanups were done thanks to - @workingjubilee in too many PRs to count! - @thomcc found a needless condition in pgcentralfoundation#1501 - @nyurik in too many PRs to count! In particular: - we now actually `pfree` our `Array`s we detoasted as-of pgcentralfoundation#1571 - creating a `RawArray` is now low-overhead due to pgcentralfoundation#1587 ## Soundness Fixes We had a number of soundness issues uncovered or have added more tests to catch them. - Bounds-checking debug assertions for array access by @NotGyro in pgcentralfoundation#1514 - Fix unsound `&` and `&mut` in `fcinfo.rs` by @workingjubilee in pgcentralfoundation#1595 ## Less Deps Part of the cleanup by @workingjubilee was reducing the number of deps we compile: * cargo-pgrx: reduce trivial dep usages in pgcentralfoundation#1499 * Update 2 syn in pgcentralfoundation#1557 Hopefully it will reduce compile time and disk usage! ## New Contributors * @the-kenny made their first contribution in pgcentralfoundation#1490 * @xwkuang5 made their first contribution in pgcentralfoundation#1445 * @rjuju made their first contribution in pgcentralfoundation#1516 * @nyurik made their first contribution in pgcentralfoundation#1533 * @NotGyro made their first contribution in pgcentralfoundation#1514 * @XeniaLu made their first contribution in pgcentralfoundation#1275 **Full Changelog**: pgcentralfoundation/pgrx@v0.12.0-alpha.0...v0.12.0-alpha.1
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Welcome to pgrx 0.12.0-alpha.1!
Say the magic words with me!
Breaking Changes
No more dlopen!
Perhaps the most exciting change this round is @usamoi's contribution in #1468 which means that we no longer perform a
dlopen
in order to generate the schema. The cost, such as it is, is that your pgrx extensions now require asrc/bin/pgrx_embed.rs
, which will be used to generate the schema. This has much less cross-platform issues and will enable supporting things likecargo binstall
down the line.It may be a bit touchy on first-time setup for transitioning older repos. If necessary, you may have to directly add a
src/bin/pgrx_embed.rs
and add the following code (which should be the only code in the file, though you can add comments if you like?):Your Cargo.toml will also want to update its crate-type key for the library:
Library Code
ManuallyDropUnion
thanks to @NotGyro in Switch toManuallyDropUnion
#1547const
s are no longerfn
, thanks to @workingjubilee in VARHDRSZconst
s are notfn
#1584Interval::is_finite
since RemoveInterval::is_finite
#1594*_tree_walker
functions to the same signature their*_impl
version in Postgres 16 has: Address pg16 rename of*_tree_walker
fn #1596pg_sql_graph_magic!()
macro. #1591 we no longer have thepg_sql_graph_magic!()
macro, which should help with more things in the future!What's New
We have quite a lot of useful additions to our API:
SpiClient::prepare_mut
was added thanks to @XeniaLu in spi: Add support for specifying mutating mode to PreparedStatement #1275#[pg_test]
, you have been able to use#[should_panic(expected = "string")]
to anticipate a panic that contains that string in that test. For various reasons,#[pg_test(error = "string")]
is much the same. Now, you can also use#[pg_test(expected = "string")]
, in the hopes that is easier to stumble across, as of Accept#[pg_test(expected = "string")]
#1570Result<composite_type!("..."), E>
supportResult<composite_type!("Name"), E>
, as a case that had not been handled before.Significantly expanded docs
Thanks to @rjuju, @NotGyro, and @workingjubilee, we now have significantly expanded docs for cargo-pgrx and pgrx in general. Some of these are in the API docs on https://docs.rs or the READMEs, but there's also a guide, now! It's not currently published, but is available as an mdbook in the repo.
Some diagnostic information that is also arguably documentation, like comments and the suggestion to
cargo install
, have also been improved, thanks to @workingjubilee incargo install
on pgrx version mismatch diagnostic #1579#[pg_cast]
An experimental macro for a
CREATE CAST
was contributed by @xwkuang5 in #1445!Legal Stuff
Thanks to @the-kenny in #1490 and @workingjubilee in #1504, it was brought to our attention that some dependencies had unusual legal requirements. So we fixed this with CI! We now check our code included into pgrx-using binaries is MIT/Apache 2.0 licensed, as is common across crates.io, using
cargo deny
!. The build tools will have more flexible legal requirements (partly due to the use of Mozilla Public License code in rustls).Internal Changes
Many internal cleanups were done thanks to
In particular:
pfree
ourArray
s we detoasted as-of pfree toasted Arrays on drop #1571RawArray
is now low-overhead due to MakeRawArray::from_ptr
a simple cast #1587Soundness Fixes
We had a number of soundness issues uncovered or have added more tests to catch them.
&
and&mut
infcinfo.rs
by @workingjubilee in Fix unsound&
and&mut
infcinfo.rs
#1595Less Deps
Part of the cleanup by @workingjubilee was reducing the number of deps we compile:
Hopefully it will reduce compile time and disk usage!
New Contributors
dirs
withhome
#1490pg_cast
for constructing PG casts from Rust functions. #1445Full Changelog: v0.12.0-alpha.0...v0.12.0-alpha.1