Skip to content

Reconcile pg_upgrade omit_column fix into source sql/cat_tools.sql.in#38

Merged
jnasbyupgrade merged 1 commit into
Postgres-Extensions:masterfrom
jnasbyupgrade:fix-omit-source
Jul 16, 2026
Merged

Reconcile pg_upgrade omit_column fix into source sql/cat_tools.sql.in#38
jnasbyupgrade merged 1 commit into
Postgres-Extensions:masterfrom
jnasbyupgrade:fix-omit-source

Conversation

@jnasbyupgrade

@jnasbyupgrade jnasbyupgrade commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

PR #18 (commit 31204e1, re-release 0.2.2) fixed binary pg_upgrade compatibility by omitting catalog columns that newer PostgreSQL removed from the pg_class_v / pg_attribute_v views:

  • pg_class: omit oid, relhasoids (removed PG12), relhaspkey (removed PG17)
  • pg_attribute: add attcacheoff (removed PG17) to the existing oid, attmissingval

But #18 applied that fix only to the generated versioned files (sql/cat_tools--0.2.2.sql.in and the *--0.2.2 update scripts), never to the source sql/cat_tools.sql.in. So running make regenerates the current-version file from source and silently reverts the #18 fix.

PR Postgres-Extensions#18 (commit 31204e1) fixed binary pg_upgrade compatibility by omitting
catalog columns that newer PostgreSQL removed from the pg_class_v /
pg_attribute_v views. However that fix was applied ONLY to the generated
versioned files (sql/cat_tools--0.2.2.sql.in and the *--0.2.2 update
scripts), never to the source sql/cat_tools.sql.in.

As a result, running `make` regenerates the current-version file from the
source and silently reverts the Postgres-Extensions#18 fix. This applies the same omit_column
arguments to the source so regeneration reproduces the released 0.2.2 SQL
byte-for-byte:

  - pg_class:     omit oid, relhasoids (PG12), relhaspkey (PG17)
  - pg_attribute: add attcacheoff (PG17) to the existing oid, attmissingval

No shipped SQL changes: the tracked generated sql/cat_tools--0.2.2.sql.in is
byte-identical before and after this change. This is a pure source/generated
reconcile; the user-facing pg_upgrade fix is already documented under 0.2.2
by Postgres-Extensions#18.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 16, 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: f328627c-472b-44b9-bcdc-d68231a3640a

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
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@jnasbyupgrade
jnasbyupgrade merged commit 44c4f2d into Postgres-Extensions:master Jul 16, 2026
19 checks passed
jnasbyupgrade added a commit to jnasbyupgrade/cat_tools that referenced this pull request Jul 18, 2026
Sync the long-lived new_functions (0.3.0 dev) branch with canonical master,
which advanced through Postgres-Extensions#38, Postgres-Extensions#37, Postgres-Extensions#32 and the Postgres-Extensions#36 0.2.3 release.

Conflict resolutions:
- sql/cat_tools.sql.in: new_functions relocated relation__kind()/relation__relkind()
  near the type definitions with the CORRECTED c/f/m mapping (an independent fix
  matching Postgres-Extensions#36) plus partitioned table/index arms; dropped master's copy at the old
  location to avoid duplicate definitions. The 0.2.3 relkind fix is preserved.
- sql.mk: took master's canonical sql.mk (owns `include pgxntool/base.mk`) as the base
  and re-applied new_functions' relkind drift-source generation block on top.
- Makefile: kept new_functions' TEST_LOAD_SOURCE harness; dropped the standalone
  base.mk include (sql.mk now owns it) and master's old TEST_BUILD_DIR machinery
  (its load_new.sql/load_upgrade.sql sources were removed on new_functions).
- .github/workflows/ci.yml: kept new_functions' harness CI (existing/update/fresh
  modes, bridge-journey pg-upgrade leg, existing_mode.sh). Postgres-Extensions#37's build-sourced dynamic
  version assertion is preserved via existing_mode.sh current_version().
- CLAUDE.md: superset — master's pgxntool note and SQL-conventions rules (with the
  0.2.3 exception) plus new_functions' harness CI documentation.
- HISTORY.asc: kept both the 0.3.0 and released 0.2.3 entries.
- version files (control, control.mk, META*.json): kept new_functions at 0.3.0.
- test/sql/relation_type.sql + .out: kept new_functions' deletion (superseded by
  relation__.sql, which carries the same de-tautologized canonical pairs Postgres-Extensions#36 added).
- sql/cat_tools--0.3.0.sql.in regenerated from the resolved cat_tools.sql.in.

Build clean; 14/14 tests pass in fresh and update (0.2.2->0.3.0) modes; verify-results green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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