Skip to content

Commit

Permalink
0.2.0-beta.2 (#261)
Browse files Browse the repository at this point in the history
* fix: dedupe fns_to_call (#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 <[email protected]>

* chore: update some dependencies (#229)

Signed-off-by: Ana Hobden <[email protected]>

* chore: ensure GitHub can blend (#237)

Signed-off-by: Ana Hobden <[email protected]>

* feat: Enable aarch64-darwin nix support (#242)

* feat: enable aarch64-darwin nix support

Signed-off-by: Ana Hobden <[email protected]>

* resolve issue #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 (#244)

* fix: Repair pgx-tests from root on darwin

Signed-off-by: Ana Hobden <[email protected]>

* chore: add newline

Signed-off-by: Ana Hobden <[email protected]>

* feat: pg14 support (#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 (#239)

Co-authored-by: Jan Cristina <[email protected]>
Co-authored-by: Ana Hobden <[email protected]>

* fix a few issues around pg14 support

* chore: update dependencies (#248)

Signed-off-by: Ana Hobden <[email protected]>

* Add link to new blog post (#249)

* Fix issues with error handling across FFI boundaries (#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 #241.

* bump version to 0.1.25

* Better debug output when entity graph is cyclic. (#260)

* chore: improve toposort error

Signed-off-by: Ana Hobden <[email protected]>

* chore: pretty print that toposort error

Signed-off-by: Ana Hobden <[email protected]>

* fix: use unaliased name in positioning refs

Signed-off-by: Ana Hobden <[email protected]>

Co-authored-by: Ana Hobden <[email protected]>

* 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 <[email protected]>
Co-authored-by: jcrist1 <[email protected]>
Co-authored-by: Jan Cristina <[email protected]>
Co-authored-by: Ryan Lambert <[email protected]>
  • Loading branch information
5 people authored Oct 21, 2021
1 parent d9c1db5 commit 7fdee34
Show file tree
Hide file tree
Showing 72 changed files with 92,351 additions and 21,607 deletions.
8 changes: 8 additions & 0 deletions .cargo/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
##
## This is necessary on the top-level so that we can build the pgx-tests/ package, as a library, as
## part of the top-level Cargo.toml workspace manifest
##

[build]
# Postgres symbols won't be available until runtime
rustflags = ["-C", "link-args=-Wl,-undefined,dynamic_lookup"]
6 changes: 5 additions & 1 deletion .envrc
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
use flake
# reload when these files change
watch_file flake.nix
watch_file flake.lock
# load the flake devShell
eval "$(nix print-dev-env)"
16 changes: 13 additions & 3 deletions .github/workflows/cargo-pgx-init.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ jobs:
sudo bash -c 'echo deb http://apt.postgresql.org/pub/repos/apt/ focal-pgdg main >> /etc/apt/sources.list.d/pgdg.list'
sudo apt update
# Install Postgres
- name: install postgres
# Install Postgres build dependencies
- name: install postgres build dependencies
run: sudo apt-get install -y clang-10 llvm-10 clang gcc make build-essential libz-dev zlib1g-dev strace libssl-dev pkg-config

# install cargo-pgx
Expand All @@ -54,7 +54,15 @@ jobs:
- name: create new sample extension
run: cd /tmp/ && cargo pgx new sample

# test that sample extension on all 4 Postgres'
# hack Cargo.toml to use this version of pgx from github
- name: hack Cargo.toml
run: |
echo '[patch.crates-io]' >> /tmp/sample/Cargo.toml
echo pgx = '{' git = '"'https://github.com/zombodb/pgx'"', package = '"'pgx'"', rev = '"'${GITHUB_SHA}'"' '}' >> /tmp/sample/Cargo.toml
echo pgx-macros = '{' git = '"'https://github.com/zombodb/pgx'"', package = '"'pgx-macros'"', rev = '"'${GITHUB_SHA}'"' '}' >> /tmp/sample/Cargo.toml
echo pgx-tests = '{' git = '"'https://github.com/zombodb/pgx'"', package = '"'pgx-tests'"', rev = '"'${GITHUB_SHA}'"' '}' >> /tmp/sample/Cargo.toml
# test that sample extension on all 4 Postgres'
- name: test sample on pg10
run: cd /tmp/sample && cargo pgx test pg10
- name: test sample on pg11
Expand All @@ -63,4 +71,6 @@ jobs:
run: cd /tmp/sample && cargo pgx test pg12
- name: test sample on pg13
run: cd /tmp/sample && cargo pgx test pg13
- name: test sample on pg14
run: cd /tmp/sample && cargo pgx test pg14

2 changes: 1 addition & 1 deletion .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:

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

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:

strategy:
matrix:
version: [10, 11, 12, 13]
version: [10, 11, 12, 13, 14]
os: ["ubuntu-latest"]

steps:
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/will-it-blend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
run: |
sudo apt-get update -y -qq --fix-missing
sudo apt-get install -y wget gnupg
sudo apt-get remove -y postgresql*
sudo bash -c 'echo deb http://apt.postgresql.org/pub/repos/apt/ focal-pgdg main >> /etc/apt/sources.list.d/pgdg.list'
sudo apt update
Expand All @@ -36,10 +37,10 @@ jobs:
- name: install cargo-pgx
run: cargo install --path cargo-pgx/ --debug

# initialize pgx to use cargo-pgs
# initialize pgx to use cargo-pgx
- name: cargo pgx init
run: cargo pgx init --pg${{ matrix.version }}=`which pg_config`

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

0 comments on commit 7fdee34

Please sign in to comment.