Skip to content
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

Update version to 0.7.2 #1058

Merged
merged 1 commit into from
Feb 23, 2023
Merged

Update version to 0.7.2 #1058

merged 1 commit into from
Feb 23, 2023

Conversation

eeeebbbbrrrr
Copy link
Contributor

@eeeebbbbrrrr eeeebbbbrrrr commented Feb 23, 2023

This is pgx v0.7.2. It contains quite a few bugfixes and API changes (some of which are breaking).

When updating please make sure to update your crate dependencies and also:

$ cargo install cargo-pgx --version 0.7.2 --locked

API Changes

There's quite a bit of changes to trigger support. PgTrigger is now parameterized with a lifetime and #[pg_trigger] functions will need to adapt to this. Additionally, #[pg_trigger] functions must now return an Option<PgHeapTuple>> (or Result<Option<PgHeapTuple>, E>) as previously it wasn't possible to return a NULL tuple (ie, Option::None), indicating that the row being acted upon should not be modified.

Range support has been changed quite a bit to be more ergonomic and provide conversion from Rust std::ops::Range* types. Check out the new example in pgx-examples/range/.

This is only relevant when the pgx/time-crate feature is used

Correctness Issues

This only impacts new extension crates made with cargo pgx new. It's better that pgx assume the extension you're about to make is wildly unsafe and for you to change that assumption in its extname.control file if you disagree.

Bug Fixes

pgx extensions can now be built against Postgres forks, but you'll need to turn on the pgx/unsafe-postgres feature for your pgx dependency.

This allows slightly more automatic conversions between data types for Spi. Especially when the Postgres type is a DOMAIN over something like TEXT and the desired Rust type is a String

pgx no longer knows that it's being used with postgrestd

cargo pgx init no longer assumes a user named "root" exists on the system

Miscellaneous

If you run Postgres or cargo pgx run with RUST_BACKTRACE=1 set in the environment, then whenever pgx catches a panic, it'll include a full backtrace!

New Contributors

Thanks everyone!

Full Changelog: v0.7.1...0.7.2

Copy link
Contributor Author

@eeeebbbbrrrr eeeebbbbrrrr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm @eeeebbbbrrrr and I approve this PR

@eeeebbbbrrrr eeeebbbbrrrr merged commit 809132b into develop Feb 23, 2023
@eeeebbbbrrrr eeeebbbbrrrr deleted the prepare-0.7.2 branch June 20, 2023 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant