From 8861148751cc3266f25ed36ea9c49c1554044532 Mon Sep 17 00:00:00 2001 From: jnasbyupgrade Date: Thu, 29 Jan 2026 12:44:25 -0600 Subject: [PATCH 1/3] Use unique database names for tests to prevent conflicts Tests now use a database named `{project}_{hash}` instead of the default `contrib_regression`. The hash is the first 5 characters of the md5 of the current directory path. This prevents multiple test runs in different projects/directories from clobbering each other's test databases. Co-Authored-By: Claude --- base.mk | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/base.mk b/base.mk index f46bbe9..fed813d 100644 --- a/base.mk +++ b/base.mk @@ -64,6 +64,13 @@ TEST__SOURCE__SQL_FILES = $(patsubst $(TESTDIR)/input/%.source,$(TESTDIR)/sql/% TEST__SOURCE__EXPECTED_FILES = $(patsubst $(TESTDIR)/output/%.source,$(TESTDIR)/expected/%.out,$(TEST__SOURCE__OUTPUT_FILES)) REGRESS = $(sort $(notdir $(subst .source,,$(TEST_FILES:.sql=)))) # Sort is to get unique list REGRESS_OPTS = --inputdir=$(TESTDIR) --outputdir=$(TESTOUT) # See additional setup below + +# Generate unique database name for tests to prevent conflicts across projects +# Uses project name + first 5 chars of md5 hash of current directory +# This prevents multiple test runs in different directories from clobbering each other +REGRESS_DBHASH := $(shell echo $(CURDIR) | (md5 2>/dev/null || md5sum) | cut -c1-5) +REGRESS_DBNAME := $(or $(PGXN),regression)_$(REGRESS_DBHASH) +REGRESS_OPTS += --dbname=$(REGRESS_DBNAME) MODULES = $(patsubst %.c,%,$(wildcard src/*.c)) ifeq ($(strip $(MODULES)),) MODULES =# Set to NUL so PGXS doesn't puke From 3441859f4cc1f60da9715caafd968d9166aa017d Mon Sep 17 00:00:00 2001 From: jnasbyupgrade Date: Thu, 29 Jan 2026 14:16:08 -0600 Subject: [PATCH 2/3] Update HISTORY.asc --- HISTORY.asc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/HISTORY.asc b/HISTORY.asc index bedc0b5..bd5913f 100644 --- a/HISTORY.asc +++ b/HISTORY.asc @@ -1,5 +1,11 @@ 1.0.0 ----- +== Use unique database names for tests +Tests now use a unique database name based on the project name and a hash of the current directory. This prevents test conflicts when running tests for multiple projects in parallel. + +== Add 3-way merge support for setup files after pgxntool-sync +New `update-setup-files.sh` script handles merging changes to files initially copied by `setup.sh` (`.gitignore`, `test/deps.sql`). After running `make pgxntool-sync`, the script performs a 3-way merge if both you and pgxntool have modified the same file, using git's native conflict markers for resolution. + == Fix broken multi-extension support Prior to this fix, distributions with multiple extensions or extensions with versions different from the PGXN distribution version were completely broken. Extension versions are now correctly read from each `.control` file's `default_version` instead of using META.json's distribution version. From 896e7392afbc395a315ad65d227cc6cf70b9980d Mon Sep 17 00:00:00 2001 From: jnasbyupgrade Date: Thu, 29 Jan 2026 14:31:09 -0600 Subject: [PATCH 3/3] Add pgxntool-sync-master targets for syncing from master branch Add `pgxntool-sync-master` and `pgxntool-sync-local-master` targets to sync from the master branch (GitHub and local respectively). Changes only in pgxntool. No related changes in pgxntool-test. Co-Authored-By: Claude --- base.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/base.mk b/base.mk index fed813d..5a4e232 100644 --- a/base.mk +++ b/base.mk @@ -313,8 +313,10 @@ pgxntool-sync: pgxntool-sync-release # could make resolving merges difficult! pgxntool-sync-release := git@github.com:decibel/pgxntool.git release pgxntool-sync-stable := git@github.com:decibel/pgxntool.git stable +pgxntool-sync-master := git@github.com:decibel/pgxntool.git master pgxntool-sync-local := ../pgxntool release # Not the same as PGXNTOOL_DIR! pgxntool-sync-local-stable := ../pgxntool stable # Not the same as PGXNTOOL_DIR! +pgxntool-sync-local-master := ../pgxntool master # Not the same as PGXNTOOL_DIR! distclean: rm -f $(PGXNTOOL_distclean)