From 3aa609a3bdb3271034d96b36f1146362192df5ab Mon Sep 17 00:00:00 2001 From: jnasbyupgrade Date: Thu, 30 Jul 2026 14:05:37 -0500 Subject: [PATCH 1/5] Fix cat_tools dependency: install from pinned git SHA, not PGXN extension_drop.sql calls cat_tools.routine__parse_arg_types_text(), which only exists starting at cat_tools 0.3.0. PGXN's published cat_tools listing is stuck at 0.2.1 from 2017 (the old decibel/cat_tools distribution) and was never updated for the Postgres-Extensions/cat_tools fork, so `pgxn install 'cat_tools>=0.2.1'` silently installed an ancient 0.2.1 that both lacks the function extension_drop needs and carries a pre-omit_column-fix catalog query that breaks on PG12+. As a result, CREATE EXTENSION extension_drop CASCADE has likely never actually succeeded in CI -- masked by pgxntool's .IGNORE: installcheck and by pg-build-test not gating on regression results. cat_tools 0.3.0 has the needed function on GitHub master but has not been tagged/published to PGXN yet (only 0.2.2/0.2.3 are tagged, and even 0.2.3 predates the function). So PGXN isn't a usable install source right now: build cat_tools from a pinned git commit instead. Once 0.3.0 is tagged and published to PGXN, this should revert to a plain `pgxn install 'cat_tools>=0.3.0' --sudo`. Also bump META.in.json's declared cat_tools floor to 0.3.0 to match the real requirement, and regenerate META.json via `make META.json`. Co-Authored-By: Claude Sonnet 5 --- META.in.json | 4 ++-- META.json | 4 ++-- Makefile | 21 ++++++++++++++++++++- README.md | 5 ++++- 4 files changed, 28 insertions(+), 6 deletions(-) diff --git a/META.in.json b/META.in.json index 71aa541..d7c8cdb 100644 --- a/META.in.json +++ b/META.in.json @@ -73,13 +73,13 @@ "X_comment": "Valid keys for 'prereqs' are configure, build, runtime, or test.", "X_comment": "Valid keys for 'requires' are requires, recommends, suggests, or conflicts.", "X_comment": "Requires event_triggers, introduced in 9.3", - "X_comment": "cat_tools: requires extension support, added in 0.2.1", + "X_comment": "cat_tools: requires cat_tools.routine__parse_arg_types_text, added in 0.3.0", "prereqs": { "build": { "requires": { "PostgreSQL": "9.3.0", - "cat_tools": "0.2.1" + "cat_tools": "0.3.0" } }, "runtime": { diff --git a/META.json b/META.json index ba237c7..70608a2 100644 --- a/META.json +++ b/META.json @@ -73,13 +73,13 @@ "X_comment": "Valid keys for 'prereqs' are configure, build, runtime, or test.", "X_comment": "Valid keys for 'requires' are requires, recommends, suggests, or conflicts.", "X_comment": "Requires event_triggers, introduced in 9.3", - "X_comment": "cat_tools: requires extension support, added in 0.2.1", + "X_comment": "cat_tools: requires cat_tools.routine__parse_arg_types_text, added in 0.3.0", "prereqs": { "build": { "requires": { "PostgreSQL": "9.3.0", - "cat_tools": "0.2.1" + "cat_tools": "0.3.0" } }, "runtime": { diff --git a/Makefile b/Makefile index 033cf30..d35aab1 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,26 @@ $(DESTDIR)$datadir)/extension/extension_drop_test.control: deps: cat_tools install: deps +# extension_drop.sql calls cat_tools.routine__parse_arg_types_text(), which only +# exists starting at cat_tools 0.3.0. PGXN's published cat_tools listing is +# stuck at 0.2.1 from 2017 (the old decibel/cat_tools distribution) and was +# never updated for the Postgres-Extensions/cat_tools fork; `pgxn install +# cat_tools` therefore installs an ancient 0.2.1 lacking the function we need +# (and carrying a pre-omit_column-fix catalog query that breaks on PG12+). +# 0.3.0 itself has not been tagged/published to PGXN yet -- only 0.2.2/0.2.3 +# are there, and even 0.2.3 predates this function. So PGXN isn't a usable +# install source right now: build straight from GitHub source instead, +# pinned to a specific commit on Postgres-Extensions/cat_tools's master for +# reproducibility. Once 0.3.0 is tagged and published to PGXN, revert this to +# a plain `pgxn install 'cat_tools>=0.3.0' --sudo`. +CAT_TOOLS_GIT_SHA = 1788dc059d49c4ff716d0c7043c43421671de008 +CAT_TOOLS_BUILD_DIR = tmp/cat_tools-build + .PHONY: cat_tools cat_tools: $(DESTDIR)$(datadir)/extension/cat_tools.control $(DESTDIR)$(datadir)/extension/cat_tools.control: - pgxn install 'cat_tools>=0.2.1' --sudo + rm -rf $(CAT_TOOLS_BUILD_DIR) + git clone https://github.com/Postgres-Extensions/cat_tools.git $(CAT_TOOLS_BUILD_DIR) + cd $(CAT_TOOLS_BUILD_DIR) && git checkout $(CAT_TOOLS_GIT_SHA) + $(MAKE) -C $(CAT_TOOLS_BUILD_DIR) install PG_CONFIG=$(PG_CONFIG) DESTDIR=$(DESTDIR) + rm -rf $(CAT_TOOLS_BUILD_DIR) diff --git a/README.md b/README.md index c38c877..ef71df3 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,10 @@ Run custom commands when an extension is dropped. By default, `DROP EXTENSION` simply drops all the objects the extension owns; this lets you register additional SQL to run when a given extension is dropped. -Requires [cat_tools](https://pgxn.org/dist/cat_tools/) >= 0.2.1. +Requires [cat_tools](https://github.com/Postgres-Extensions/cat_tools) >= 0.3.0. +Note: as of this writing, cat_tools 0.3.0 has not been tagged/published to +PGXN yet, so the `cat_tools` build dependency is installed from a pinned git +commit rather than via `pgxn install` -- see the `Makefile`. ## Functions From fb4931d0160650cbdf4c66f7be32bbb603719162 Mon Sep 17 00:00:00 2001 From: jnasbyupgrade Date: Thu, 30 Jul 2026 14:11:04 -0500 Subject: [PATCH 2/5] debug: temporarily dump regression.diffs in CI (to be reverted) --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index aad0d23..d102c54 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,6 +23,9 @@ jobs: uses: actions/checkout@v5 - name: Test on PostgreSQL ${{ matrix.pg }} run: pg-build-test + - name: TEMP DEBUG dump regression diffs + if: always() + run: cat test/regression.diffs || true # A single stable check name for use as a required status check in branch # protection. Matrix jobs produce names like "🐘 PostgreSQL 14" that change From e100d0d1845401b76cadfb20f1f75ccb0be76068 Mon Sep 17 00:00:00 2001 From: jnasbyupgrade Date: Thu, 30 Jul 2026 14:14:13 -0500 Subject: [PATCH 3/5] Revert "debug: temporarily dump regression.diffs in CI (to be reverted)" This reverts commit fb4931d0160650cbdf4c66f7be32bbb603719162. --- .github/workflows/ci.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d102c54..aad0d23 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,9 +23,6 @@ jobs: uses: actions/checkout@v5 - name: Test on PostgreSQL ${{ matrix.pg }} run: pg-build-test - - name: TEMP DEBUG dump regression diffs - if: always() - run: cat test/regression.diffs || true # A single stable check name for use as a required status check in branch # protection. Matrix jobs produce names like "🐘 PostgreSQL 14" that change From c8156509ca17b0486ee5052166e22d2f4cdfa189 Mon Sep 17 00:00:00 2001 From: jnasbyupgrade Date: Thu, 30 Jul 2026 16:38:39 -0500 Subject: [PATCH 4/5] Clarify: git-pin is a supported fallback, not just a temporary hack The Makefile comment and README previously read as if pinning cat_tools to a git SHA were only a stopgap to be ripped out. Reword to separate the two claims: this specific SHA pin is temporary (revert once cat_tools 0.3.0 is tagged on PGXN), but building a dependency straight from a pinned git commit is a supported technique here whenever a dependency's PGXN listing lags its real development -- worth reaching for again, not something to design away entirely. Co-Authored-By: Claude Sonnet 5 --- Makefile | 14 ++++++++++---- README.md | 7 +++++-- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index d35aab1..cf3dda7 100644 --- a/Makefile +++ b/Makefile @@ -19,10 +19,16 @@ install: deps # (and carrying a pre-omit_column-fix catalog query that breaks on PG12+). # 0.3.0 itself has not been tagged/published to PGXN yet -- only 0.2.2/0.2.3 # are there, and even 0.2.3 predates this function. So PGXN isn't a usable -# install source right now: build straight from GitHub source instead, -# pinned to a specific commit on Postgres-Extensions/cat_tools's master for -# reproducibility. Once 0.3.0 is tagged and published to PGXN, revert this to -# a plain `pgxn install 'cat_tools>=0.3.0' --sudo`. +# install source right now. +# +# Building straight from a pinned git commit instead of PGXN is a supported +# way to depend on an extension here, not just a one-off hack -- reach for it +# again whenever a dependency's real state has moved ahead of what's tagged +# on PGXN. What IS temporary is this specific pin: CAT_TOOLS_GIT_SHA below is +# a stopgap for cat_tools 0.3.0 specifically, tracking the tip of its master +# as of this fix. Once 0.3.0 is tagged and published to PGXN, revert *this +# target* to a plain `pgxn install 'cat_tools>=0.3.0' --sudo`; leave the +# git-pin mechanism itself in place for reuse if this happens again. CAT_TOOLS_GIT_SHA = 1788dc059d49c4ff716d0c7043c43421671de008 CAT_TOOLS_BUILD_DIR = tmp/cat_tools-build diff --git a/README.md b/README.md index ef71df3..068115b 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,11 @@ register additional SQL to run when a given extension is dropped. Requires [cat_tools](https://github.com/Postgres-Extensions/cat_tools) >= 0.3.0. Note: as of this writing, cat_tools 0.3.0 has not been tagged/published to -PGXN yet, so the `cat_tools` build dependency is installed from a pinned git -commit rather than via `pgxn install` -- see the `Makefile`. +PGXN yet, so the `cat_tools` build dependency is temporarily installed from a +pinned git commit rather than via `pgxn install` -- see the `Makefile`. This +will revert to a plain `pgxn install` once 0.3.0 is published; building from +a pinned commit is itself a supported fallback for this kind of gap, not a +one-off hack. ## Functions From baf0a6e4c527d9fafea67a56be12f2d9cb41bcda Mon Sep 17 00:00:00 2001 From: jnasbyupgrade Date: Thu, 30 Jul 2026 16:51:26 -0500 Subject: [PATCH 5/5] Track cat_tools master instead of a pinned commit SHA No tagged cat_tools release has the function we need, so there's nothing meaningfully more stable to pin to than master right now -- the fixed SHA added false precision without a real reproducibility benefit. Track the branch directly; the git-source-instead-of-PGXN mechanism itself is unchanged. Co-Authored-By: Claude Sonnet 5 --- Makefile | 22 ++++++++++++---------- README.md | 10 +++++----- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/Makefile b/Makefile index cf3dda7..8b37be9 100644 --- a/Makefile +++ b/Makefile @@ -21,15 +21,17 @@ install: deps # are there, and even 0.2.3 predates this function. So PGXN isn't a usable # install source right now. # -# Building straight from a pinned git commit instead of PGXN is a supported -# way to depend on an extension here, not just a one-off hack -- reach for it -# again whenever a dependency's real state has moved ahead of what's tagged -# on PGXN. What IS temporary is this specific pin: CAT_TOOLS_GIT_SHA below is -# a stopgap for cat_tools 0.3.0 specifically, tracking the tip of its master -# as of this fix. Once 0.3.0 is tagged and published to PGXN, revert *this -# target* to a plain `pgxn install 'cat_tools>=0.3.0' --sudo`; leave the -# git-pin mechanism itself in place for reuse if this happens again. -CAT_TOOLS_GIT_SHA = 1788dc059d49c4ff716d0c7043c43421671de008 +# Building straight from a git ref instead of PGXN is a supported way to +# depend on an extension here, not just a one-off hack -- reach for it again +# whenever a dependency's real state has moved ahead of what's tagged on +# PGXN. What IS temporary is depending on cat_tools this way at all: +# CAT_TOOLS_GIT_REF tracks cat_tools' `master` directly rather than a pinned +# commit, since the function we need doesn't exist on any tagged release, so +# there's nothing more stable to pin to yet. Once 0.3.0 is tagged and +# published to PGXN, revert *this target* to a plain +# `pgxn install 'cat_tools>=0.3.0' --sudo`; leave the git-source mechanism +# itself in place for reuse if this happens again. +CAT_TOOLS_GIT_REF = master CAT_TOOLS_BUILD_DIR = tmp/cat_tools-build .PHONY: cat_tools @@ -37,6 +39,6 @@ cat_tools: $(DESTDIR)$(datadir)/extension/cat_tools.control $(DESTDIR)$(datadir)/extension/cat_tools.control: rm -rf $(CAT_TOOLS_BUILD_DIR) git clone https://github.com/Postgres-Extensions/cat_tools.git $(CAT_TOOLS_BUILD_DIR) - cd $(CAT_TOOLS_BUILD_DIR) && git checkout $(CAT_TOOLS_GIT_SHA) + cd $(CAT_TOOLS_BUILD_DIR) && git checkout $(CAT_TOOLS_GIT_REF) $(MAKE) -C $(CAT_TOOLS_BUILD_DIR) install PG_CONFIG=$(PG_CONFIG) DESTDIR=$(DESTDIR) rm -rf $(CAT_TOOLS_BUILD_DIR) diff --git a/README.md b/README.md index 068115b..29a8720 100644 --- a/README.md +++ b/README.md @@ -6,11 +6,11 @@ register additional SQL to run when a given extension is dropped. Requires [cat_tools](https://github.com/Postgres-Extensions/cat_tools) >= 0.3.0. Note: as of this writing, cat_tools 0.3.0 has not been tagged/published to -PGXN yet, so the `cat_tools` build dependency is temporarily installed from a -pinned git commit rather than via `pgxn install` -- see the `Makefile`. This -will revert to a plain `pgxn install` once 0.3.0 is published; building from -a pinned commit is itself a supported fallback for this kind of gap, not a -one-off hack. +PGXN yet, so the `cat_tools` build dependency is temporarily installed +straight from its `master` branch rather than via `pgxn install` -- see the +`Makefile`. This will revert to a plain `pgxn install` once 0.3.0 is +published; building from a git ref is itself a supported fallback for this +kind of gap, not a one-off hack. ## Functions