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

Prepare 0.4.0 #486

Merged
merged 1 commit into from
Mar 16, 2022
Merged

Prepare 0.4.0 #486

merged 1 commit into from
Mar 16, 2022

Conversation

Hoverbear
Copy link
Contributor

@Hoverbear Hoverbear commented Mar 16, 2022

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 the pgx::datum::sql_entity_graph) should be aware that pgx::datum::sql_entity_graph was merged with pgx_utils::sql_entity_graph and is available at pgx::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 the pgx extension Cargo.toml's pgx* versions to 0.4.0-beta.0.

Then:

  • Remove .cargo/pgx-linker-script.sh, src/bin/sql-generator.rs.
    rm .cargo/pgx-linker-script.sh src/bin/sql-generator.rs
  • Replace .cargo/config with:
    [build]
    # Postgres symbols won't be available until runtime
    rustflags = ["-C", "link-args=-Wl,-undefined,dynamic_lookup"]
  • In your Cargo.toml:
      [lib]
    + crate-type = ["cdylib"]
    - crate-type = ["cdylib", "rlib"]

What's Changed

Signed-off-by: Ana Hobden <[email protected]>
@Hoverbear Hoverbear changed the base branch from master to develop March 16, 2022 16:41
@Hoverbear Hoverbear merged commit a96c1b7 into develop Mar 16, 2022
@eeeebbbbrrrr eeeebbbbrrrr deleted the prepare-0.4.0 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