From e6ece0f217eafa36cd1c63fe090b194d05ea462d Mon Sep 17 00:00:00 2001 From: jnasbyupgrade Date: Tue, 7 Oct 2025 15:33:16 -0500 Subject: [PATCH 01/10] Add Claude Code support files - Add .claude/settings.json with references to pgxntool and test repos - Add CLAUDE.md documenting the test template fixture - Include git commit guidelines Co-Authored-By: Claude --- .claude/settings.json | 8 +++ CLAUDE.md | 136 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 144 insertions(+) create mode 100644 .claude/settings.json create mode 100644 CLAUDE.md diff --git a/.claude/settings.json b/.claude/settings.json new file mode 100644 index 0000000..245d950 --- /dev/null +++ b/.claude/settings.json @@ -0,0 +1,8 @@ +{ + "permissions": { + "additionalDirectories": [ + "../pgxntool/", + "../pgxntool-test/" + ] + } +} diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..fefdafb --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,136 @@ +# CLAUDE.md + +This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. + +## Git Commit Guidelines + +**IMPORTANT**: When creating commit messages, do not attribute commits to yourself (Claude). Commit messages should reflect the work being done without AI attribution in the message body. The standard Co-Authored-By trailer is acceptable. + +## What This Repo Is + +**pgxntool-test-template** is a minimal "dummy" PostgreSQL extension that serves as a test subject for **../pgxntool-test/** (the test harness). + +This repo is **NOT intended to be used as a real extension**. It exists solely to: +1. Demonstrate proper pgxntool integration +2. Provide a known-good starting state for automated tests +3. Serve as a template that tests clone and manipulate + +## The Three-Repository Pattern + +- **../pgxntool/** - The build framework (embedded via git subtree) +- **../pgxntool-test/** - The test harness that clones this repo and validates pgxntool +- **pgxntool-test-template/** (this repo) - The test subject (minimal working extension) + +**Testing flow**: pgxntool-test clones this repo → runs pgxntool operations → validates outputs + +## Repository Structure + +``` +pgxntool-test-template/ +├── pgxntool-test.control # Extension control file +└── t/ # Embedded pgxntool + extension code + ├── doc/ + │ └── TEST_DOC.asc # Sample documentation + ├── sql/ + │ └── pgxntool-test.sql # Extension SQL (simple add function) + ├── test/ + │ └── input/ + │ └── pgxntool-test.source # Test file (loads extension, runs simple test) + └── .gitignore +``` + +**Important**: This repo has a subdirectory structure (everything in `t/`) which is unusual. Most real extensions using pgxntool would have files at the root level. This structure is specific to the testing setup. + +## What the Extension Does + +The extension provides a single trivial function: + +```sql +CREATE FUNCTION "pgxntool-test"(a int, b int) RETURNS int +``` + +It simply adds two integers. The function is intentionally minimal because the focus is testing pgxntool's build/test infrastructure, not extension functionality. + +## How pgxntool-test Uses This Repo + +The test harness (**../pgxntool-test/**) performs these operations: + +1. **Clone**: `git clone` this repo to a temp directory +2. **Isolate**: Rewire git remote to a fake repo (prevents accidental pushes) +3. **Inject pgxntool**: Either via `git subtree add` or `rsync` (if testing uncommitted changes) +4. **Run setup**: Execute `pgxntool/setup.sh` +5. **Build/Test**: Run `make`, `make test`, `make dist`, etc. +6. **Validate**: Compare outputs against expected results + +## Expected Test Behavior + +When used in tests, this extension should: +- Successfully run `pgxntool/setup.sh` (when repo is clean) +- Build without errors +- Pass its single test (verifying 1 + 2 = 3) +- Generate proper META.json from META.in.json template +- Create distribution .zip file +- Generate HTML from TEST_DOC.asc + +## Maintenance Guidelines + +**Changes to this repo should be rare** because: +1. It's a test fixture - stability is more important than features +2. Changes may require updating expected outputs in **../pgxntool-test/expected/** +3. It should remain minimal to make test failures easy to diagnose + +**When to modify**: +- Adding test coverage for new pgxntool features +- Fixing bugs in the test fixture itself +- Updating for PostgreSQL version compatibility + +**When modifying**: +1. Make changes here +2. Run full test suite: `cd ../pgxntool-test && make test` +3. Verify all tests still pass OR update expected outputs if intentional +4. Document what changed and why + +## File Details + +### pgxntool-test.control +Standard PostgreSQL extension control file. Specifies: +- Extension name: `pgxntool-test` +- Default version, comment, etc. + +### t/sql/pgxntool-test.sql +The extension's SQL code. Contains a simple addition function that works on PostgreSQL 9.1+ (avoids named parameters for old version compatibility). + +### t/test/input/pgxntool-test.source +Test file using pg_regress format: +- Loads pgTap via pgxntool's setup infrastructure +- Loads extension deps via `test/deps.sql` +- Creates extension `pgxntool-test` +- Runs one test verifying the add function works +- Uses pgTap `plan()`, `is()`, and `finish()` functions + +### t/doc/TEST_DOC.asc +Minimal Asciidoc file for testing document generation. pgxntool should auto-detect and convert to HTML. + +## Not Present (But Would Be in Real Extensions) + +Real extensions using pgxntool typically have: +- `Makefile` (just `include pgxntool/base.mk`) +- `META.in.json` (metadata template) +- `src/*.c` (optional C code) +- Actual functionality beyond a trivial add function +- Comprehensive test suite +- Real documentation + +These are omitted or minimal here because they're created/validated by the test harness itself. + +## Related Repositories + +- **../pgxntool/** - The build framework being tested +- **../pgxntool-test/** - The test harness that uses this repo as a test subject + +## Special Notes + +- **Git subtree**: This repo expects pgxntool to be added via `git subtree add -P pgxntool` +- **Clean repo required**: Tests verify that setup.sh properly rejects dirty repos +- **Version compatibility**: SQL code avoids features requiring newer PostgreSQL versions +- **Fake asciidoc**: Tests may use a fake asciidoc implementation to avoid dependency variability From 911f1f0946f6cf9c43940079a1bd7200dc757f5f Mon Sep 17 00:00:00 2001 From: jnasbyupgrade Date: Tue, 7 Oct 2025 16:25:59 -0500 Subject: [PATCH 02/10] Add .gitignore to ignore Claude local settings Co-Authored-By: Claude --- .gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8d32378 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.claude/*.local.json From f92ca3b9c0579f486fe7c9a4ab89a0977cb1a812 Mon Sep 17 00:00:00 2001 From: jnasbyupgrade Date: Tue, 7 Oct 2025 16:28:32 -0500 Subject: [PATCH 03/10] Remove .gitignore (will be provided by pgxntool/_.gitignore) Co-Authored-By: Claude --- .gitignore | 1 - 1 file changed, 1 deletion(-) delete mode 100644 .gitignore diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 8d32378..0000000 --- a/.gitignore +++ /dev/null @@ -1 +0,0 @@ -.claude/*.local.json From 023745a195aac35b2badb3a2d3d7d3b7812a8340 Mon Sep 17 00:00:00 2001 From: jnasbyupgrade Date: Tue, 16 Dec 2025 14:39:53 -0600 Subject: [PATCH 04/10] Add upgrade script content to pgxntool-test--0.1.0--0.1.1.sql --- t/sql/pgxntool-test--0.1.0--0.1.1.sql | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/t/sql/pgxntool-test--0.1.0--0.1.1.sql b/t/sql/pgxntool-test--0.1.0--0.1.1.sql index e69de29..ac7f9b7 100644 --- a/t/sql/pgxntool-test--0.1.0--0.1.1.sql +++ b/t/sql/pgxntool-test--0.1.0--0.1.1.sql @@ -0,0 +1,11 @@ +-- Upgrade from 0.1.0 to 0.1.1 +-- Adds the pgxntool-test-multiply function + +CREATE FUNCTION "pgxntool-test-multiply"( + a int + , b int +) RETURNS int LANGUAGE sql IMMUTABLE AS $body$ +SELECT $1 * $2 +$body$; + +-- vi: expandtab ts=2 sw=2 From ecf56e531b7d7e01989f136d2b2042c48fa3c0fd Mon Sep 17 00:00:00 2001 From: jnasbyupgrade Date: Tue, 16 Dec 2025 14:46:17 -0600 Subject: [PATCH 05/10] Update upgrade script to add bigint version of pgxntool-test function --- t/sql/pgxntool-test--0.1.0--0.1.1.sql | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/t/sql/pgxntool-test--0.1.0--0.1.1.sql b/t/sql/pgxntool-test--0.1.0--0.1.1.sql index ac7f9b7..5a5aefd 100644 --- a/t/sql/pgxntool-test--0.1.0--0.1.1.sql +++ b/t/sql/pgxntool-test--0.1.0--0.1.1.sql @@ -1,11 +1,11 @@ -- Upgrade from 0.1.0 to 0.1.1 --- Adds the pgxntool-test-multiply function +-- Adds a bigint version of the pgxntool-test function -CREATE FUNCTION "pgxntool-test-multiply"( - a int - , b int -) RETURNS int LANGUAGE sql IMMUTABLE AS $body$ -SELECT $1 * $2 +CREATE FUNCTION "pgxntool-test"( + a bigint + , b bigint +) RETURNS bigint LANGUAGE sql IMMUTABLE AS $body$ +SELECT $1 + $2 -- 9.1 doesn't support named sql language parameters $body$; -- vi: expandtab ts=2 sw=2 From 57576bbea25118296efeedadf2179d78bb616a41 Mon Sep 17 00:00:00 2001 From: jnasbyupgrade Date: Tue, 16 Dec 2025 16:29:14 -0600 Subject: [PATCH 06/10] Add 0.1.0.sql version file and update default_version to 0.1.1 --- pgxntool-test.control | 5 ++++- t/sql/pgxntool-test--0.1.0.sql | 8 ++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 t/sql/pgxntool-test--0.1.0.sql diff --git a/pgxntool-test.control b/pgxntool-test.control index 35142c0..7008e0d 100644 --- a/pgxntool-test.control +++ b/pgxntool-test.control @@ -1 +1,4 @@ -default_version = '0.1.0' +comment = 'Test extension for pgxntool' +default_version = '0.1.1' +requires = 'plpgsql' +schema = 'public' diff --git a/t/sql/pgxntool-test--0.1.0.sql b/t/sql/pgxntool-test--0.1.0.sql new file mode 100644 index 0000000..3cea3d8 --- /dev/null +++ b/t/sql/pgxntool-test--0.1.0.sql @@ -0,0 +1,8 @@ +CREATE FUNCTION "pgxntool-test"( + a int + , b int +) RETURNS int LANGUAGE sql IMMUTABLE AS $body$ +SELECT $1 + $2 -- 9.1 doesn't support named sql language parameters +$body$; + +-- vi: expandtab ts=2 sw=2 From 405576618c795ff81e864cef7da5dc7d708802f7 Mon Sep 17 00:00:00 2001 From: jnasbyupgrade Date: Tue, 16 Dec 2025 16:34:23 -0600 Subject: [PATCH 07/10] Update base SQL file to include both int and bigint function versions --- t/sql/pgxntool-test.sql | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/t/sql/pgxntool-test.sql b/t/sql/pgxntool-test.sql index 3cea3d8..ff05564 100644 --- a/t/sql/pgxntool-test.sql +++ b/t/sql/pgxntool-test.sql @@ -5,4 +5,11 @@ CREATE FUNCTION "pgxntool-test"( SELECT $1 + $2 -- 9.1 doesn't support named sql language parameters $body$; +CREATE FUNCTION "pgxntool-test"( + a bigint + , b bigint +) RETURNS bigint LANGUAGE sql IMMUTABLE AS $body$ +SELECT $1 + $2 -- 9.1 doesn't support named sql language parameters +$body$; + -- vi: expandtab ts=2 sw=2 From 5a34f404eb701eb0f1b4668d07665eae55e488aa Mon Sep 17 00:00:00 2001 From: jnasbyupgrade Date: Wed, 31 Dec 2025 13:37:56 -0600 Subject: [PATCH 08/10] Update upgrade script formatting and add git configuration files - Reformat `t/sql/pgxntool-test--0.1.0--0.1.1.sql` to use block comment style - Add `.gitattributes` to exclude `.gitattributes` and `.claude/` from git archives - Add `.gitignore` to ignore `.DS_Store` files Co-Authored-By: Claude --- .gitattributes | 2 ++ .gitignore | 1 + t/sql/pgxntool-test--0.1.0--0.1.1.sql | 6 ++++-- 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .gitattributes create mode 100644 .gitignore diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..210e0fa --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +.gitattributes export-ignore +.claude/ export-ignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e43b0f9 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.DS_Store diff --git a/t/sql/pgxntool-test--0.1.0--0.1.1.sql b/t/sql/pgxntool-test--0.1.0--0.1.1.sql index 5a5aefd..3d3aac5 100644 --- a/t/sql/pgxntool-test--0.1.0--0.1.1.sql +++ b/t/sql/pgxntool-test--0.1.0--0.1.1.sql @@ -1,5 +1,7 @@ --- Upgrade from 0.1.0 to 0.1.1 --- Adds a bigint version of the pgxntool-test function +/* + * Upgrade from 0.1.0 to 0.1.1 + * Adds a bigint version of the pgxntool-test function + */ CREATE FUNCTION "pgxntool-test"( a bigint From f1e8b0a333afebdbcefc8870eb28b58dee6e657b Mon Sep 17 00:00:00 2001 From: jnasbyupgrade Date: Thu, 8 Jan 2026 14:53:59 -0600 Subject: [PATCH 09/10] Update template structure for pgxntool changes Update for pgxntool commit c7b5705 (pg_tle version changes and lib.sh): - Add `.DS_Store` to `.gitattributes` export-ignore rules Reorganize template structure to match test expectations: - Move `pgxntool-test.control` to `t/` directory - Remove `.gitignore` files (pgxntool's `_.gitignore` handles this) These changes align with the new test infrastructure in pgxntool-test that copies only files from `t/` directory to test repository root. Co-Authored-By: Claude --- .gitattributes | 1 + .gitignore | 1 - t/.gitignore | 2 -- pgxntool-test.control => t/pgxntool-test.control | 0 4 files changed, 1 insertion(+), 3 deletions(-) delete mode 100644 .gitignore delete mode 100644 t/.gitignore rename pgxntool-test.control => t/pgxntool-test.control (100%) diff --git a/.gitattributes b/.gitattributes index 210e0fa..e976821 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,2 +1,3 @@ .gitattributes export-ignore .claude/ export-ignore +.DS_Store export-ignore diff --git a/.gitignore b/.gitignore deleted file mode 100644 index e43b0f9..0000000 --- a/.gitignore +++ /dev/null @@ -1 +0,0 @@ -.DS_Store diff --git a/t/.gitignore b/t/.gitignore deleted file mode 100644 index 2f5184c..0000000 --- a/t/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -.*.swp -.DS_Store diff --git a/pgxntool-test.control b/t/pgxntool-test.control similarity index 100% rename from pgxntool-test.control rename to t/pgxntool-test.control From 13e9fbd0aed2b1be01d512fbf32aa46b462a4784 Mon Sep 17 00:00:00 2001 From: jnasbyupgrade Date: Thu, 8 Jan 2026 15:28:32 -0600 Subject: [PATCH 10/10] Deprecate repository - template files moved to pgxntool-test Remove template files (t/ directory) - they have been moved to pgxntool-test/template/. The test harness now creates fresh test repositories directly from those template files, eliminating the need for a separate template repository. Add deprecation notices in CLAUDE.md and README.md explaining that this repository is no longer used and exists only to preserve commit history. The pgxntool project now uses a simpler two-repository pattern: - pgxntool/ - Framework code - pgxntool-test/ - Test harness with template files Co-Authored-By: Claude --- CLAUDE.md | 137 +++----------------------- README.md | 35 +++++++ t/TEST_DOC.asc | 1 - t/doc/adoc_doc.adoc | 0 t/doc/asc_doc.asc | 0 t/doc/asciidoc_doc.asciidoc | 0 t/doc/other.html | 0 t/pgxntool-test.control | 4 - t/sql/pgxntool-test--0.1.0--0.1.1.sql | 13 --- t/sql/pgxntool-test--0.1.0.sql | 8 -- t/sql/pgxntool-test.sql | 15 --- t/test/input/pgxntool-test.source | 12 --- 12 files changed, 49 insertions(+), 176 deletions(-) create mode 100644 README.md delete mode 100644 t/TEST_DOC.asc delete mode 100644 t/doc/adoc_doc.adoc delete mode 100644 t/doc/asc_doc.asc delete mode 100644 t/doc/asciidoc_doc.asciidoc delete mode 100644 t/doc/other.html delete mode 100644 t/pgxntool-test.control delete mode 100644 t/sql/pgxntool-test--0.1.0--0.1.1.sql delete mode 100644 t/sql/pgxntool-test--0.1.0.sql delete mode 100644 t/sql/pgxntool-test.sql delete mode 100644 t/test/input/pgxntool-test.source diff --git a/CLAUDE.md b/CLAUDE.md index fefdafb..a77a726 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1,136 +1,27 @@ # CLAUDE.md -This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. +## Repository Status: DEPRECATED -## Git Commit Guidelines +**This repository is deprecated and no longer used.** It is kept only to preserve its commit history. -**IMPORTANT**: When creating commit messages, do not attribute commits to yourself (Claude). Commit messages should reflect the work being done without AI attribution in the message body. The standard Co-Authored-By trailer is acceptable. +## What Happened -## What This Repo Is +The template extension files that used to live in this repository have been moved to `../pgxntool-test/template/`. The test harness now creates fresh test repositories directly from that template directory, eliminating the need for a separate template repository. -**pgxntool-test-template** is a minimal "dummy" PostgreSQL extension that serves as a test subject for **../pgxntool-test/** (the test harness). +## Migration -This repo is **NOT intended to be used as a real extension**. It exists solely to: -1. Demonstrate proper pgxntool integration -2. Provide a known-good starting state for automated tests -3. Serve as a template that tests clone and manipulate +If you need the template files, they are now located at: +- **../pgxntool-test/template/** -## The Three-Repository Pattern +The test harness (`../pgxntool-test/`) contains all testing infrastructure and template files in a single repository. -- **../pgxntool/** - The build framework (embedded via git subtree) -- **../pgxntool-test/** - The test harness that clones this repo and validates pgxntool -- **pgxntool-test-template/** (this repo) - The test subject (minimal working extension) +## Two-Repository Pattern -**Testing flow**: pgxntool-test clones this repo → runs pgxntool operations → validates outputs +The pgxntool project now uses a simpler two-repository pattern: -## Repository Structure +1. **../pgxntool/** - The framework code that gets embedded into extension projects +2. **../pgxntool-test/** - The test harness (includes template files in `template/` directory) -``` -pgxntool-test-template/ -├── pgxntool-test.control # Extension control file -└── t/ # Embedded pgxntool + extension code - ├── doc/ - │ └── TEST_DOC.asc # Sample documentation - ├── sql/ - │ └── pgxntool-test.sql # Extension SQL (simple add function) - ├── test/ - │ └── input/ - │ └── pgxntool-test.source # Test file (loads extension, runs simple test) - └── .gitignore -``` +## Historical Context -**Important**: This repo has a subdirectory structure (everything in `t/`) which is unusual. Most real extensions using pgxntool would have files at the root level. This structure is specific to the testing setup. - -## What the Extension Does - -The extension provides a single trivial function: - -```sql -CREATE FUNCTION "pgxntool-test"(a int, b int) RETURNS int -``` - -It simply adds two integers. The function is intentionally minimal because the focus is testing pgxntool's build/test infrastructure, not extension functionality. - -## How pgxntool-test Uses This Repo - -The test harness (**../pgxntool-test/**) performs these operations: - -1. **Clone**: `git clone` this repo to a temp directory -2. **Isolate**: Rewire git remote to a fake repo (prevents accidental pushes) -3. **Inject pgxntool**: Either via `git subtree add` or `rsync` (if testing uncommitted changes) -4. **Run setup**: Execute `pgxntool/setup.sh` -5. **Build/Test**: Run `make`, `make test`, `make dist`, etc. -6. **Validate**: Compare outputs against expected results - -## Expected Test Behavior - -When used in tests, this extension should: -- Successfully run `pgxntool/setup.sh` (when repo is clean) -- Build without errors -- Pass its single test (verifying 1 + 2 = 3) -- Generate proper META.json from META.in.json template -- Create distribution .zip file -- Generate HTML from TEST_DOC.asc - -## Maintenance Guidelines - -**Changes to this repo should be rare** because: -1. It's a test fixture - stability is more important than features -2. Changes may require updating expected outputs in **../pgxntool-test/expected/** -3. It should remain minimal to make test failures easy to diagnose - -**When to modify**: -- Adding test coverage for new pgxntool features -- Fixing bugs in the test fixture itself -- Updating for PostgreSQL version compatibility - -**When modifying**: -1. Make changes here -2. Run full test suite: `cd ../pgxntool-test && make test` -3. Verify all tests still pass OR update expected outputs if intentional -4. Document what changed and why - -## File Details - -### pgxntool-test.control -Standard PostgreSQL extension control file. Specifies: -- Extension name: `pgxntool-test` -- Default version, comment, etc. - -### t/sql/pgxntool-test.sql -The extension's SQL code. Contains a simple addition function that works on PostgreSQL 9.1+ (avoids named parameters for old version compatibility). - -### t/test/input/pgxntool-test.source -Test file using pg_regress format: -- Loads pgTap via pgxntool's setup infrastructure -- Loads extension deps via `test/deps.sql` -- Creates extension `pgxntool-test` -- Runs one test verifying the add function works -- Uses pgTap `plan()`, `is()`, and `finish()` functions - -### t/doc/TEST_DOC.asc -Minimal Asciidoc file for testing document generation. pgxntool should auto-detect and convert to HTML. - -## Not Present (But Would Be in Real Extensions) - -Real extensions using pgxntool typically have: -- `Makefile` (just `include pgxntool/base.mk`) -- `META.in.json` (metadata template) -- `src/*.c` (optional C code) -- Actual functionality beyond a trivial add function -- Comprehensive test suite -- Real documentation - -These are omitted or minimal here because they're created/validated by the test harness itself. - -## Related Repositories - -- **../pgxntool/** - The build framework being tested -- **../pgxntool-test/** - The test harness that uses this repo as a test subject - -## Special Notes - -- **Git subtree**: This repo expects pgxntool to be added via `git subtree add -P pgxntool` -- **Clean repo required**: Tests verify that setup.sh properly rejects dirty repos -- **Version compatibility**: SQL code avoids features requiring newer PostgreSQL versions -- **Fake asciidoc**: Tests may use a fake asciidoc implementation to avoid dependency variability +This repository previously served as a minimal "dummy" PostgreSQL extension used as a test subject. Tests would clone this repository and manipulate it to validate pgxntool's functionality. This approach has been replaced with a simpler method of creating fresh test repositories from template files stored directly in the test harness. diff --git a/README.md b/README.md new file mode 100644 index 0000000..9f89aef --- /dev/null +++ b/README.md @@ -0,0 +1,35 @@ +# pgxntool-test-template + +## ⚠️ DEPRECATED REPOSITORY + +**This repository is no longer used and exists only to preserve its commit history.** + +## What Happened + +The template extension files that used to live here have been moved to: +- **[pgxntool-test/template/](https://github.com/decibel/pgxntool-test/tree/master/template)** + +The test harness now creates fresh test repositories directly from that template directory, eliminating the need for a separate template repository. + +## Current Architecture + +The pgxntool project now uses a two-repository pattern: + +1. **[pgxntool](https://github.com/decibel/pgxntool)** - The framework code +2. **[pgxntool-test](https://github.com/decibel/pgxntool-test)** - The test harness with template files + +## Migration Guide + +If you were using this repository: +- Template files are now in `pgxntool-test/template/` +- Tests create repositories directly from those template files +- No changes needed to existing workflows using `pgxntool-test` + +## Historical Context + +This repository served as a minimal PostgreSQL extension that was cloned and manipulated during testing. The approach has been simplified to use template files stored directly in the test harness repository. + +--- + +**Repository archived on:** 2026-01-08 +**Reason:** Consolidated into pgxntool-test repository diff --git a/t/TEST_DOC.asc b/t/TEST_DOC.asc deleted file mode 100644 index 9a01daf..0000000 --- a/t/TEST_DOC.asc +++ /dev/null @@ -1 +0,0 @@ -This is just a test file. diff --git a/t/doc/adoc_doc.adoc b/t/doc/adoc_doc.adoc deleted file mode 100644 index e69de29..0000000 diff --git a/t/doc/asc_doc.asc b/t/doc/asc_doc.asc deleted file mode 100644 index e69de29..0000000 diff --git a/t/doc/asciidoc_doc.asciidoc b/t/doc/asciidoc_doc.asciidoc deleted file mode 100644 index e69de29..0000000 diff --git a/t/doc/other.html b/t/doc/other.html deleted file mode 100644 index e69de29..0000000 diff --git a/t/pgxntool-test.control b/t/pgxntool-test.control deleted file mode 100644 index 7008e0d..0000000 --- a/t/pgxntool-test.control +++ /dev/null @@ -1,4 +0,0 @@ -comment = 'Test extension for pgxntool' -default_version = '0.1.1' -requires = 'plpgsql' -schema = 'public' diff --git a/t/sql/pgxntool-test--0.1.0--0.1.1.sql b/t/sql/pgxntool-test--0.1.0--0.1.1.sql deleted file mode 100644 index 3d3aac5..0000000 --- a/t/sql/pgxntool-test--0.1.0--0.1.1.sql +++ /dev/null @@ -1,13 +0,0 @@ -/* - * Upgrade from 0.1.0 to 0.1.1 - * Adds a bigint version of the pgxntool-test function - */ - -CREATE FUNCTION "pgxntool-test"( - a bigint - , b bigint -) RETURNS bigint LANGUAGE sql IMMUTABLE AS $body$ -SELECT $1 + $2 -- 9.1 doesn't support named sql language parameters -$body$; - --- vi: expandtab ts=2 sw=2 diff --git a/t/sql/pgxntool-test--0.1.0.sql b/t/sql/pgxntool-test--0.1.0.sql deleted file mode 100644 index 3cea3d8..0000000 --- a/t/sql/pgxntool-test--0.1.0.sql +++ /dev/null @@ -1,8 +0,0 @@ -CREATE FUNCTION "pgxntool-test"( - a int - , b int -) RETURNS int LANGUAGE sql IMMUTABLE AS $body$ -SELECT $1 + $2 -- 9.1 doesn't support named sql language parameters -$body$; - --- vi: expandtab ts=2 sw=2 diff --git a/t/sql/pgxntool-test.sql b/t/sql/pgxntool-test.sql deleted file mode 100644 index ff05564..0000000 --- a/t/sql/pgxntool-test.sql +++ /dev/null @@ -1,15 +0,0 @@ -CREATE FUNCTION "pgxntool-test"( - a int - , b int -) RETURNS int LANGUAGE sql IMMUTABLE AS $body$ -SELECT $1 + $2 -- 9.1 doesn't support named sql language parameters -$body$; - -CREATE FUNCTION "pgxntool-test"( - a bigint - , b bigint -) RETURNS bigint LANGUAGE sql IMMUTABLE AS $body$ -SELECT $1 + $2 -- 9.1 doesn't support named sql language parameters -$body$; - --- vi: expandtab ts=2 sw=2 diff --git a/t/test/input/pgxntool-test.source b/t/test/input/pgxntool-test.source deleted file mode 100644 index d076ebd..0000000 --- a/t/test/input/pgxntool-test.source +++ /dev/null @@ -1,12 +0,0 @@ -\i @abs_srcdir@/pgxntool/setup.sql - -SELECT plan(1); - -SELECT is( - "pgxntool-test"(1,2) - , 3 -); - -\i @abs_srcdir@/pgxntool/finish.sql - --- vi: expandtab ts=2 sw=2