From 49f00804ffe7fd33cea5858dcf98c74137d898e8 Mon Sep 17 00:00:00 2001 From: jnasbyupgrade Date: Wed, 15 Jul 2026 19:13:44 -0500 Subject: [PATCH] Reconcile pg_upgrade omit_column fix into source sql/cat_tools.sql.in PR #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 #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 #18. Co-Authored-By: Claude Opus 4.8 --- sql/cat_tools.sql.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sql/cat_tools.sql.in b/sql/cat_tools.sql.in index bf119eb..6cdbdca 100644 --- a/sql/cat_tools.sql.in +++ b/sql/cat_tools.sql.in @@ -67,7 +67,7 @@ CREATE OR REPLACE VIEW _cat_tools.pg_class_v AS LEFT JOIN pg_namespace n ON( n.oid = c.relnamespace ) ; $fmt$ - , __cat_tools.omit_column('pg_catalog.pg_class') + , __cat_tools.omit_column('pg_catalog.pg_class', array['oid', 'relhasoids', 'relhaspkey']) )); REVOKE ALL ON _cat_tools.pg_class_v FROM public; @@ -766,7 +766,7 @@ $fmt$ * attmissingval is explicitly included above (cast to text[] via SED markers). * Omit it here so it doesn't appear twice, and omit oid to avoid conflicts on PG12+. */ - , __cat_tools.omit_column('pg_catalog.pg_attribute', array['oid', 'attmissingval']) + , __cat_tools.omit_column('pg_catalog.pg_attribute', array['oid', 'attmissingval', 'attcacheoff']) , __cat_tools.omit_column('pg_catalog.pg_type') )); REVOKE ALL ON _cat_tools.pg_attribute_v FROM public;