From ce49066c4affa5d3c40d03d002e6038b6d0e6eb5 Mon Sep 17 00:00:00 2001 From: "Joshua (D) Drake" <136637981+ChronicallyJD@users.noreply.github.com> Date: Mon, 6 Jul 2026 20:50:00 -0600 Subject: [PATCH 1/2] CI: build and test hstore_plphp alongside the other transforms hstore_plphp shipped in 2.5.0 but was never wired into CI: only jsonb_plphp (and now bytea_plphp) were built and installchecked. Add hstore_plphp to both the PG 11-18 matrix job and the ASAN job, mirroring the jsonb_plphp/bytea_plphp steps. The hstore contrib extension it depends on ships in the postgresql-N package CI already installs, so no extra apt dependency is needed. Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/ci.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2c06935..72a34ff 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -60,6 +60,15 @@ jobs: PG_CONFIG=/usr/lib/postgresql/${{ matrix.pg }}/bin/pg_config \ PHP_CONFIG=php-config${{ matrix.php }} install + - name: Build and install hstore_plphp + run: | + make -C hstore_plphp \ + PG_CONFIG=/usr/lib/postgresql/${{ matrix.pg }}/bin/pg_config \ + PHP_CONFIG=php-config${{ matrix.php }} + sudo make -C hstore_plphp \ + PG_CONFIG=/usr/lib/postgresql/${{ matrix.pg }}/bin/pg_config \ + PHP_CONFIG=php-config${{ matrix.php }} install + - name: Build and install bytea_plphp run: | make -C bytea_plphp \ @@ -92,6 +101,13 @@ jobs: make -C jsonb_plphp \ PG_CONFIG=/usr/lib/postgresql/${{ matrix.pg }}/bin/pg_config installcheck + - name: Run the hstore_plphp regression tests + run: | + port=$(pg_lsclusters | awk '$1 == "${{ matrix.pg }}" && $2 == "main" { print $3 }') + sudo -u postgres env PGPORT=$port \ + make -C hstore_plphp \ + PG_CONFIG=/usr/lib/postgresql/${{ matrix.pg }}/bin/pg_config installcheck + - name: Run the bytea_plphp regression tests run: | port=$(pg_lsclusters | awk '$1 == "${{ matrix.pg }}" && $2 == "main" { print $3 }') @@ -104,6 +120,7 @@ jobs: run: | cat regression.diffs 2>/dev/null || true cat jsonb_plphp/regression.diffs 2>/dev/null || true + cat hstore_plphp/regression.diffs 2>/dev/null || true cat bytea_plphp/regression.diffs 2>/dev/null || true asan: @@ -136,6 +153,10 @@ jobs: ASAN_FLAGS="-fsanitize=address -fno-omit-frame-pointer" sudo make -C jsonb_plphp PG_CONFIG=/usr/lib/postgresql/18/bin/pg_config PHP_CONFIG=php-config8.3 \ ASAN_FLAGS="-fsanitize=address -fno-omit-frame-pointer" install + make -C hstore_plphp PG_CONFIG=/usr/lib/postgresql/18/bin/pg_config PHP_CONFIG=php-config8.3 \ + ASAN_FLAGS="-fsanitize=address -fno-omit-frame-pointer" + sudo make -C hstore_plphp PG_CONFIG=/usr/lib/postgresql/18/bin/pg_config PHP_CONFIG=php-config8.3 \ + ASAN_FLAGS="-fsanitize=address -fno-omit-frame-pointer" install make -C bytea_plphp PG_CONFIG=/usr/lib/postgresql/18/bin/pg_config PHP_CONFIG=php-config8.3 \ ASAN_FLAGS="-fsanitize=address -fno-omit-frame-pointer" sudo make -C bytea_plphp PG_CONFIG=/usr/lib/postgresql/18/bin/pg_config PHP_CONFIG=php-config8.3 \ @@ -167,6 +188,9 @@ jobs: sudo -u postgres env PGPORT=$port \ make -C jsonb_plphp \ PG_CONFIG=/usr/lib/postgresql/18/bin/pg_config installcheck + sudo -u postgres env PGPORT=$port \ + make -C hstore_plphp \ + PG_CONFIG=/usr/lib/postgresql/18/bin/pg_config installcheck sudo -u postgres env PGPORT=$port \ make -C bytea_plphp \ PG_CONFIG=/usr/lib/postgresql/18/bin/pg_config installcheck @@ -178,4 +202,5 @@ jobs: sudo tail -50 /tmp/pg-asan.log 2>/dev/null || true cat regression.diffs 2>/dev/null || true cat jsonb_plphp/regression.diffs 2>/dev/null || true + cat hstore_plphp/regression.diffs 2>/dev/null || true cat bytea_plphp/regression.diffs 2>/dev/null || true From 85cd9881ac8b8e56457297235a89e3ada146c2c9 Mon Sep 17 00:00:00 2001 From: "Joshua (D) Drake" <136637981+ChronicallyJD@users.noreply.github.com> Date: Mon, 6 Jul 2026 20:59:39 -0600 Subject: [PATCH 2/2] hstore_plphp: make test teardown version-independent Wiring hstore_plphp into CI surfaced that its test passed only on PG 18: PG 11-17 failed on the final DROP EXTENSION ... CASCADE, whose NOTICE lists cascaded objects in a version-dependent way (PostgreSQL records TRANSFORM dependencies differently across releases, so the count and ordering differ). Every other line of the test was already identical across versions. Silence the cascade NOTICE with client_min_messages = warning around the teardown and regenerate the expected output. This matches how the jsonb_plphp test avoids the issue (it drops its functions explicitly rather than via CASCADE). Co-Authored-By: Claude Opus 4.8 (1M context) --- hstore_plphp/expected/hstore_plphp.out | 19 +++++-------------- hstore_plphp/sql/hstore_plphp.sql | 5 +++++ 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/hstore_plphp/expected/hstore_plphp.out b/hstore_plphp/expected/hstore_plphp.out index 00fc879..3358735 100644 --- a/hstore_plphp/expected/hstore_plphp.out +++ b/hstore_plphp/expected/hstore_plphp.out @@ -213,18 +213,9 @@ SELECT ht_via_spi(); string (1 row) +-- Tear down. The CASCADE notice lists dependent objects in a +-- version-dependent way (how PostgreSQL records TRANSFORM dependencies has +-- changed across releases), so silence it to keep the test output stable. +SET client_min_messages = warning; DROP EXTENSION hstore_plphp CASCADE; -NOTICE: drop cascades to 13 other objects -DETAIL: drop cascades to function ht_classes(hstore) -drop cascades to function ht_upcase(hstore) -drop cascades to function ht_build(integer) -drop cascades to function ht_merge(hstore,hstore) -drop cascades to function ht_empty(hstore) -drop cascades to function ht_bad() -drop cascades to function ht_nested() -drop cascades to function ht_normalize() -drop cascades to function ht_field(ht_rec) -drop cascades to function ht_make(integer) -drop cascades to function ht_shatter(hstore) -drop cascades to function ht_table(integer) -drop cascades to function ht_via_spi() +RESET client_min_messages; diff --git a/hstore_plphp/sql/hstore_plphp.sql b/hstore_plphp/sql/hstore_plphp.sql index 6bd60b6..9945405 100644 --- a/hstore_plphp/sql/hstore_plphp.sql +++ b/hstore_plphp/sql/hstore_plphp.sql @@ -148,4 +148,9 @@ TRANSFORM FOR TYPE hstore LANGUAGE plphp AS $$ $$; SELECT ht_via_spi(); +-- Tear down. The CASCADE notice lists dependent objects in a +-- version-dependent way (how PostgreSQL records TRANSFORM dependencies has +-- changed across releases), so silence it to keep the test output stable. +SET client_min_messages = warning; DROP EXTENSION hstore_plphp CASCADE; +RESET client_min_messages;