-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
408: Upgrade to pgx 0.4.5 r=rtwalker a=rtwalker ### Upgrading to the latest pgx Closes #387 Went from 0.2.4 -> 0.3.0 -> 0.4.0 -> 0.4.3, editing the Cargo.toml, building, and testing, and the experience was largely unremarkable. Most of the changes come from followng the "Upgrading" section of the [0.4.0](https://github.com/tcdi/pgx/releases/tag/v0.4.0) release notes. Only thing to note is that I ran into a *lot* of occurrences of the following error: ``` error[E0053]: method `input` has an incompatible type for trait --> extension/src/type_builder.rs:261:29 | 261 | fn input(input: &std::ffi::CStr) -> $name<'input> | ^^^^^^^^^^^^^^^ | | | expected struct `pgx::cstr_core::CStr`, found struct `std::ffi::CStr` | help: change the parameter type to match the trait: `&pgx::cstr_core::CStr` ``` However, just blindly swapping in the `pgx::cstr_core` `CStr(ing)`s for the `std::ffi` ones made Rust much happier. Please yell at me if that's too irresponsible. ### macOS support on Apple M1 Macs I think we should be OK to close #401 as well. `pgx` claims M1 support, and by virtue of being able to do ``` $ cargo pgx run pg14 Stopping Postgres v14 building extension with features `pg14` "cargo" "build" "--features" "pg14" "--no-default-features" "--message-format=json-render-diagnostics" Finished dev [unoptimized + debuginfo] target(s) in 0.07s installing extension Copying control file to /Users/rwalker/.pgx/14.2/pgx-install/share/postgresql/extension/timescaledb_toolkit.control Copying shared library to /Users/rwalker/.pgx/14.2/pgx-install/lib/postgresql/timescaledb_toolkit.so Discovering SQL entities Discovered 655 SQL entities: 9 schemas (1 unique), 521 functions, 71 types, 0 enums, 54 sqls, 0 ords, 0 hashes, 0 aggregates Writing SQL entities to /Users/rwalker/.pgx/14.2/pgx-install/share/postgresql/extension/timescaledb_toolkit--1.7.0-dev.sql Finished installing timescaledb_toolkit Starting Postgres v14 on port 28814 Re-using existing database timescaledb_toolkit psql (14.2) Type "help" for help. timescaledb_toolkit=# ``` and ``` $ cargo pgx test pg14 "cargo" "test" "--features" "pg14 pg_test" "--no-default-features" Finished test [unoptimized + debuginfo] target(s) in 0.07s Running unittests (/Users/rwalker/timescale/timescaledb-toolkit/target/debug/deps/timescaledb_toolkit-66d8cc098ff75a32) running 131 tests building extension with features `pg14 pg_test` "cargo" "build" "--features" "pg14 pg_test" "--no-default-features" "--message-format=json-render-diagnostics" Finished dev [unoptimized + debuginfo] target(s) in 0.06s installing extension Copying control file to /Users/rwalker/.pgx/14.2/pgx-install/share/postgresql/extension/timescaledb_toolkit.control Copying shared library to /Users/rwalker/.pgx/14.2/pgx-install/lib/postgresql/timescaledb_toolkit.so Discovering SQL entities Discovered 837 SQL entities: 39 schemas (2 unique), 668 functions, 72 types, 0 enums, 58 sqls, 0 ords, 0 hashes, 0 aggregates Writing SQL entities to /Users/rwalker/.pgx/14.2/pgx-install/share/postgresql/extension/timescaledb_toolkit--1.7.0-dev.sql Finished installing timescaledb_toolkit ** eliding the list of 131 tests ** test result: ok. 131 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 8.87s Stopping Postgres ``` where I have ``` $ uname -om arm64 Darwin ``` I think we can claim M1 support too. Co-authored-by: Ryan Walker <rwalker@timescale.com> Co-authored-by: Eric Gillespie <epg@timescale.com>
- Loading branch information
Showing
13 changed files
with
375 additions
and
308 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,3 @@ | ||
# Auto-generated by pgx. You may edit this, or delete it to have a new one created. | ||
|
||
[target.x86_64-unknown-linux-gnu] | ||
linker = "./.cargo/pgx-linker-script.sh" | ||
|
||
[target.aarch64-unknown-linux-gnu] | ||
linker = "./.cargo/pgx-linker-script.sh" | ||
|
||
[target.x86_64-apple-darwin] | ||
linker = "./.cargo/pgx-linker-script.sh" | ||
|
||
[target.aarch64-apple-darwin] | ||
linker = "./.cargo/pgx-linker-script.sh" | ||
|
||
[target.x86_64-unknown-freebsd] | ||
linker = "./.cargo/pgx-linker-script.sh" | ||
[build] | ||
# Postgres symbols won't be available until runtime | ||
rustflags = ["-C", "link-args=-Wl,-undefined,dynamic_lookup"] |
This file was deleted.
Oops, something went wrong.
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
This file was deleted.
Oops, something went wrong.
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
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
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
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
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
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