Skip to content

Add historical install scripts from PGXN distributions#9

Closed
jnasbyupgrade wants to merge 8 commits intoPostgres-Extensions:masterfrom
jnasbyupgrade:historical-sql-files
Closed

Add historical install scripts from PGXN distributions#9
jnasbyupgrade wants to merge 8 commits intoPostgres-Extensions:masterfrom
jnasbyupgrade:historical-sql-files

Conversation

@jnasbyupgrade
Copy link
Copy Markdown
Contributor

Summary

  • Adds the canonical install SQL scripts for all previously-published versions of cat_tools, extracted from the PGXN distributions
  • Updates .gitignore to allow tracking version-specific SQL files

Files Added

Version Source
sql/cat_tools--0.1.0.sql Extracted from PGXN zip (pre-built)
sql/cat_tools--0.1.3.sql Extracted from PGXN zip (pre-built)
sql/cat_tools--0.1.4.sql Extracted from PGXN zip (pre-built)
sql/cat_tools--0.1.5.sql Built from PGXN source for PG >= 9.5
sql/cat_tools--0.2.0.sql Built from PGXN source for PG >= 9.5
sql/cat_tools--0.2.1.sql Built from PGXN source for PG >= 9.5

For 0.1.5–0.2.1, the PGXN distributions include only the source .sql.in file (not a pre-built output). These were built using the same sed pipeline as the Makefile, targeting PG >= 9.5 (REQUIRES 9.5 features enabled, PRIOR TO 9.5 alternatives commented out).

Why

These files are needed as known-good starting points for upgrade path testing — critical for verifying that ALTER EXTENSION cat_tools UPDATE works correctly from any installed version.

🤖 Generated with Claude Code

jnasbyupgrade and others added 8 commits November 6, 2024 12:23
bed3604 Fix pg_regress on versions > 12 (#5) (#6)

git-subtree-dir: pgxntool
git-subtree-split: bed36044679d6b53ad7cd2875272552a4ad6508a
8176304 Stamp 2.0.2
3e142ab Fix parse_control_file: remove comments before stripping quotes (#27)
cacc301 Stamp 2.0.1
bf1db6b Fix bash 3.2 / Linux compatibility issues (#26)
62d0fcb Fix broken ifeq for --load-language=plpgsql on PG < 13 (#24)
121f0b3 Stamp 2.0.0
ad3ca7e Remove .source support; add test/install, test/build, and verify-results (#18)
c010cf8 Fix bash 3.2 compatibility (#23)
abeb9d3 Remove .source file support from pg_regress integration (#22)
08c1879 Stamp 1.1.2
6e0dad2 Fix double --dbname bug that defeated unique test database names
639756c Stamp 1.1.1
6ba3176 Fix pg_tle exception handler and empty upgrade files (Postgres-Extensions#15)
3b8cb2a Stamp 1.1.0
550a901 Remove commit.md (maintained in pgxntool-test)
d73ca93 Add unique test database names to prevent conflicts (Postgres-Extensions#13)
9b344be Add update-setup-files.sh for 3-way merging after pgxntool-sync (Postgres-Extensions#12)
ab7f6e2 Stamp 1.0.0
3a571ba Add pg_tle support and modernize test infrastructure (Postgres-Extensions#11)
b96ea6d Add support for Claude code; build and doc improvements (Postgres-Extensions#9)
e9c24de Fix pg_regress on versions > 12 (#5)
REVERT: bed3604 Fix pg_regress on versions > 12 (#5) (#6)

git-subtree-dir: pgxntool
git-subtree-split: 81763048198c5927e89053135a496969bceb3bcf
Each file is the canonical install script as published to PGXN:
- 0.1.0–0.1.4: extracted directly from PGXN zip (pre-built)
- 0.1.5–0.2.1: built from PGXN source for PG >= 9.5
  (REQUIRES 9.5 features enabled, PRIOR TO 9.5 alternatives commented out)

Also update .gitignore to allow tracking version-specific SQL files.

These are needed as starting points for upgrade path testing.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
For versions 0.1.5, 0.2.0, and 0.2.1, replace the pre-built SQL files
with versioned .sql.in source files extracted from the original PGXN
distributions. The build system will now generate version-appropriate
SQL for the running Postgres version using the existing sed rules.

Findings from PGXN zip inspection:
- 0.1.0, 0.1.3, 0.1.4: only pre-built sql/cat_tools.sql (no .in source);
  kept as-is in sql/ with explicit DATA += entries
- 0.1.5: sql/cat_tools.in.sql exists but has no SED markers (pre-dates
  the conditional system); used as-is, sed processing is a no-op
- 0.2.0: sql/cat_tools.in.sql with SED: REQUIRES 9.3/9.5 markers
- 0.2.1: sql/cat_tools.sql.in with SED: REQUIRES/PRIOR TO 9.3/9.5 markers

Makefile changes:
- versioned_in glob widened from *--*--*.sql.in to *--*.sql.in so that
  single-version install scripts are processed alongside upgrade scripts
- Added DATA += for pre-built install scripts (0.1.0, 0.1.3, 0.1.4)
- Added DATA += $(versioned_out) for generated install scripts

sql/.gitignore: ignore generated cat_tools--0.1.5/0.2.0/0.2.1.sql files

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
0.1.5's PGXN source predates the SED conditional system and has no
REQUIRES/PRIOR TO markers, so building from .sql.in would produce
identical output regardless of PG version. Treat it like 0.1.0-0.1.4:
commit the pre-built SQL directly.

Also add a comment to sql/.gitignore explaining which versions are
generated vs committed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@jnasbyupgrade jnasbyupgrade deleted the historical-sql-files branch April 15, 2026 22:52
jnasbyupgrade added a commit to jnasbyupgrade/cat_tools that referenced this pull request Apr 16, 2026
8176304 Stamp 2.0.2
3e142ab Fix parse_control_file: remove comments before stripping quotes (#27)
cacc301 Stamp 2.0.1
bf1db6b Fix bash 3.2 / Linux compatibility issues (#26)
62d0fcb Fix broken ifeq for --load-language=plpgsql on PG < 13 (#24)
121f0b3 Stamp 2.0.0
ad3ca7e Remove .source support; add test/install, test/build, and verify-results (#18)
c010cf8 Fix bash 3.2 compatibility (#23)
abeb9d3 Remove .source file support from pg_regress integration (#22)
08c1879 Stamp 1.1.2
6e0dad2 Fix double --dbname bug that defeated unique test database names
639756c Stamp 1.1.1
6ba3176 Fix pg_tle exception handler and empty upgrade files (Postgres-Extensions#15)
3b8cb2a Stamp 1.1.0
550a901 Remove commit.md (maintained in pgxntool-test)
d73ca93 Add unique test database names to prevent conflicts (Postgres-Extensions#13)
9b344be Add update-setup-files.sh for 3-way merging after pgxntool-sync (Postgres-Extensions#12)
ab7f6e2 Stamp 1.0.0
3a571ba Add pg_tle support and modernize test infrastructure (Postgres-Extensions#11)
b96ea6d Add support for Claude code; build and doc improvements (Postgres-Extensions#9)
e9c24de Fix pg_regress on versions > 12 (#5)

git-subtree-dir: pgxntool
git-subtree-split: 81763048198c5927e89053135a496969bceb3bcf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant