Skip to content

Commit 7fdee34

Browse files
eeeebbbbrrrrHoverbearjcrist1Jan Cristinarustprooflabs
authored
* fix: dedupe fns_to_call (pgcentralfoundation#236) A user reported experiencing duplicate entries in builds using a Vec, so we now use a HashSet to ensure uniqueness. Signed-off-by: Ana Hobden <operator@hoverbear.org> * chore: update some dependencies (pgcentralfoundation#229) Signed-off-by: Ana Hobden <operator@hoverbear.org> * chore: ensure GitHub can blend (pgcentralfoundation#237) Signed-off-by: Ana Hobden <operator@hoverbear.org> * feat: Enable aarch64-darwin nix support (pgcentralfoundation#242) * feat: enable aarch64-darwin nix support Signed-off-by: Ana Hobden <operator@hoverbear.org> * resolve issue pgcentralfoundation#241: pg_extern functions need to be `extern "C"`. - we were also missing a few `#[no_mangle]`s - ignore warnings about i128 not being ffi safe - `direct_function_call()` now expects an `extern "C"` function * bump version to 0.1.23 * update generated bindings from macos * fix: Fixup Darwin linking issues (pgcentralfoundation#244) * fix: Repair pgx-tests from root on darwin Signed-off-by: Ana Hobden <operator@hoverbear.org> * chore: add newline Signed-off-by: Ana Hobden <operator@hoverbear.org> * feat: pg14 support (pgcentralfoundation#245) * support PostgreSQL 14 * include pg14 in CI tests * need pg14 in the Cargo.toml template for new pgx progjects * complete cargo-pgx support for pg14 * fix issue around shmem initialization * another feature for pg14 * fix issue with exported symbol for shared memory support * bump version to 0.1.24 * slice-into-datum (pgcentralfoundation#239) Co-authored-by: Jan Cristina <jan.cristina@starmind.com> Co-authored-by: Ana Hobden <operator@hoverbear.org> * fix a few issues around pg14 support * chore: update dependencies (pgcentralfoundation#248) Signed-off-by: Ana Hobden <operator@hoverbear.org> * Add link to new blog post (pgcentralfoundation#249) * Fix issues with error handling across FFI boundaries (pgcentralfoundation#250) * Fix issues with error handling across FFI boundaries This also makes a few functions unsafe, so we had to litter parts of the code with unsafe{} blocks. The primary user-facing change here is if users are using `pgx::direct_function_call()` to call Rust-based functions with the `#[pg_extern]` annotation, those functions now need to be called using `pgx::direct_pg_extern_function_call()`. In general, this is yet another follow-up to issue pgcentralfoundation#241. * bump version to 0.1.25 * Better debug output when entity graph is cyclic. (pgcentralfoundation#260) * chore: improve toposort error Signed-off-by: Ana Hobden <operator@hoverbear.org> * chore: pretty print that toposort error Signed-off-by: Ana Hobden <operator@hoverbear.org> * fix: use unaliased name in positioning refs Signed-off-by: Ana Hobden <operator@hoverbear.org> Co-authored-by: Ana Hobden <operator@hoverbear.org> * bump version to 0.2.0-beta.2 * upgrade dependencies * update comments * hack the sample's Cargo.toml file to use this specific version of pgx dependencies from github * remove old versions of postgres before we explicitly install pg13 * fix type-o * fix this test yet again. Co-authored-by: Ana Hobden <operator@hoverbear.org> Co-authored-by: jcrist1 <jan.cristina@gmail.com> Co-authored-by: Jan Cristina <jan.cristina@starmind.com> Co-authored-by: Ryan Lambert <rustprooflabs@users.noreply.github.com>
1 parent d9c1db5 commit 7fdee34

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+92351
-21607
lines changed

.cargo/config

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
##
2+
## This is necessary on the top-level so that we can build the pgx-tests/ package, as a library, as
3+
## part of the top-level Cargo.toml workspace manifest
4+
##
5+
6+
[build]
7+
# Postgres symbols won't be available until runtime
8+
rustflags = ["-C", "link-args=-Wl,-undefined,dynamic_lookup"]

.envrc

+5-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1-
use flake
1+
# reload when these files change
2+
watch_file flake.nix
3+
watch_file flake.lock
4+
# load the flake devShell
5+
eval "$(nix print-dev-env)"

.github/workflows/cargo-pgx-init.yml

+13-3
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ jobs:
3838
sudo bash -c 'echo deb http://apt.postgresql.org/pub/repos/apt/ focal-pgdg main >> /etc/apt/sources.list.d/pgdg.list'
3939
sudo apt update
4040
41-
# Install Postgres
42-
- name: install postgres
41+
# Install Postgres build dependencies
42+
- name: install postgres build dependencies
4343
run: sudo apt-get install -y clang-10 llvm-10 clang gcc make build-essential libz-dev zlib1g-dev strace libssl-dev pkg-config
4444

4545
# install cargo-pgx
@@ -54,7 +54,15 @@ jobs:
5454
- name: create new sample extension
5555
run: cd /tmp/ && cargo pgx new sample
5656

57-
# test that sample extension on all 4 Postgres'
57+
# hack Cargo.toml to use this version of pgx from github
58+
- name: hack Cargo.toml
59+
run: |
60+
echo '[patch.crates-io]' >> /tmp/sample/Cargo.toml
61+
echo pgx = '{' git = '"'https://github.com/zombodb/pgx'"', package = '"'pgx'"', rev = '"'${GITHUB_SHA}'"' '}' >> /tmp/sample/Cargo.toml
62+
echo pgx-macros = '{' git = '"'https://github.com/zombodb/pgx'"', package = '"'pgx-macros'"', rev = '"'${GITHUB_SHA}'"' '}' >> /tmp/sample/Cargo.toml
63+
echo pgx-tests = '{' git = '"'https://github.com/zombodb/pgx'"', package = '"'pgx-tests'"', rev = '"'${GITHUB_SHA}'"' '}' >> /tmp/sample/Cargo.toml
64+
65+
# test that sample extension on all 4 Postgres'
5866
- name: test sample on pg10
5967
run: cd /tmp/sample && cargo pgx test pg10
6068
- name: test sample on pg11
@@ -63,4 +71,6 @@ jobs:
6371
run: cd /tmp/sample && cargo pgx test pg12
6472
- name: test sample on pg13
6573
run: cd /tmp/sample && cargo pgx test pg13
74+
- name: test sample on pg14
75+
run: cd /tmp/sample && cargo pgx test pg14
6676

.github/workflows/examples.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818

1919
strategy:
2020
matrix:
21-
version: [10, 11, 12, 13]
21+
version: [10, 11, 12, 13, 14]
2222
os: ["ubuntu-latest"]
2323
examples: ["aggregate", "arrays", "bad_ideas", "bgworker", "bytea", "custom_types", "custom_sql", "errors", "operators", "schemas", "shmem", "spi", "srf", "strings", "triggers"]
2424

.github/workflows/test.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818

1919
strategy:
2020
matrix:
21-
version: [10, 11, 12, 13]
21+
version: [10, 11, 12, 13, 14]
2222
os: ["ubuntu-latest"]
2323

2424
steps:

.github/workflows/will-it-blend.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ jobs:
2525
run: |
2626
sudo apt-get update -y -qq --fix-missing
2727
sudo apt-get install -y wget gnupg
28+
sudo apt-get remove -y postgresql*
2829
sudo bash -c 'echo deb http://apt.postgresql.org/pub/repos/apt/ focal-pgdg main >> /etc/apt/sources.list.d/pgdg.list'
2930
sudo apt update
3031
@@ -36,10 +37,10 @@ jobs:
3637
- name: install cargo-pgx
3738
run: cargo install --path cargo-pgx/ --debug
3839

39-
# initialize pgx to use cargo-pgs
40+
# initialize pgx to use cargo-pgx
4041
- name: cargo pgx init
4142
run: cargo pgx init --pg${{ matrix.version }}=`which pg_config`
4243

4344
# just see if the code checks out okay
4445
- name: cargo check
45-
run: RUST_BACKTRACE=1 cargo check --all --features "pg${{ matrix.version }}"
46+
run: RUST_BACKTRACE=1 cargo check --all --features "pg${{ matrix.version }} pg_test"

0 commit comments

Comments
 (0)