Skip to content

sql.mk: remove now-redundant historical_installs derivation - #61

Open
jnasbyupgrade wants to merge 1 commit into
Postgres-Extensions:masterfrom
jnasbyupgrade:cleanup-historical-installs-redundancy
Open

sql.mk: remove now-redundant historical_installs derivation#61
jnasbyupgrade wants to merge 1 commit into
Postgres-Extensions:masterfrom
jnasbyupgrade:cleanup-historical-installs-redundancy

Conversation

@jnasbyupgrade

Copy link
Copy Markdown
Contributor

Stacked on #58 (pgxntool 2.3.0 sync).

pgxntool issue #48 -- filed citing cat_tools' own workaround (`DATA += sql/cat_tools--0.2.1.sql`) as one of two known examples -- was that `base.mk`'s `DATA` wildcard only matched `sql/----.sql` (upgrade scripts, two dashes), silently skipping historical single-dash full-install scripts like `sql/cat_tools--0.1.0.sql`. pgxntool 2.3.0 fixed this by widening the wildcard to `sql/--*.sql`, matching both.

Our `historical_installs` variable was a generalized version of that exact workaround (deriving the committed, non-`.sql.in`-backed `cat_tools--0.1.*.sql` files), now fully superseded: `base.mk`'s own `DATA` wildcard already includes them at parse time, since these files are committed directly and always present regardless of build state. This is unlike the generated versioned/upgrade files -- that derivation (`versioned_out`/`upgrade_scripts_out`) stays, since it exists for a different, still-open reason (cat_tools issue #28's two-phase-make timing gap, unaffected by pgxntool's dash-count fix).

Verified on a truly clean tree (`make clean`, only committed `.sql` present): `make -s print-DATA` lists all 8 historical `cat_tools--0.1.*.sql` files without this derivation, `make install` places them in the real extension directory, and `make test`/`verify-results`/`test-update` all still pass.

@coderabbitai

coderabbitai Bot commented Aug 1, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 562a4655-47d1-4b47-b155-4c8c02e77348

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

@jnasbyupgrade
jnasbyupgrade changed the base branch from pgxntool-2.3.0-sync to master August 1, 2026 22:33
pgxntool issue Postgres-Extensions#48 (filed citing cat_tools' own workaround as an example) was
that base.mk's DATA wildcard only matched sql/*--*--*.sql (upgrade scripts,
two dashes), silently skipping historical single-dash full-install scripts
like sql/cat_tools--0.1.0.sql. pgxntool 2.3.0 fixed this by widening the
wildcard to sql/*--*.sql, which matches both. Our historical_installs
variable was a generalized version of that exact workaround (deriving the
committed, non-.sql.in-backed cat_tools--0.1.*.sql files), now fully
superseded: base.mk's own DATA wildcard already includes them at parse time,
since these files are committed directly and are always present regardless
of build state (unlike the generated versioned/upgrade files, which is a
separate, still-needed derivation here for a different reason -- cat_tools
issue Postgres-Extensions#28's two-phase-make timing gap, unaffected by pgxntool's dash-count fix).

Verified on a truly clean tree (make clean, only committed .sql present):
make -s print-DATA lists all 8 historical cat_tools--0.1.*.sql files without
this derivation, make install places them in the real extension directory,
and make test / verify-results / test-update all still pass.
@jnasbyupgrade
jnasbyupgrade force-pushed the cleanup-historical-installs-redundancy branch from f9d2585 to b701538 Compare August 1, 2026 22:38
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