Skip to content

Remove reg* pseudotype columns; add object info functions - #17

Merged
jnasbyupgrade merged 10 commits into
masterfrom
reconcile-object-functions
Aug 11, 2026
Merged

Remove reg* pseudotype columns; add object info functions#17
jnasbyupgrade merged 10 commits into
masterfrom
reconcile-object-functions

Conversation

@jnasbyupgrade

@jnasbyupgrade jnasbyupgrade commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Drop the reg* pseudotype columns (regclass/regconfig/regdictionary/regnamespace/regoperator/regprocedure/regtype) from _object_reference._object_oid in favor of a single plain oid column (object_oid) and a plain oid classid, removing the now-unnecessary count_nulls-backed null_count trigger that used to arbitrate between them.

  • Drop the count_nulls dependency entirely (the search_path workaround DO block, object_reference.control's requires, the Makefile install target, and test setup) — the trigger above was its only reason for being there.
  • Add object_reference.object__describe() / object__identity() (thin wrappers around pg_describe_object()/pg_identify_object()), and object__cleanup() (best-effort delete, ignoring foreign_key_violation), wired to a new AFTER DELETE trigger on object_group__object so removing an object from its last group auto-attempts cleanup.
  • object__getsert's core (_object_v__for_update) now refuses to track objects living in a pg_temp*/pg_toast_temp* schema.
  • Test updates: object_group.sql's scratch tables switch from TEMP to regular tables (temp objects are now rejected) plus new coverage for the cleanup trigger; base.sql swaps the now-moot count_nulls-relocation test for coverage of object_oid, object__describe()/object__identity(), and temp-object rejection.
  • _object_reference._object_oid.object_oid was later dropped too — it always equaled objid and never diverged.

sql/object_reference--0.1.0.sql (the frozen historical release) is untouched — frozen versioned SQL files are never hand-edited after release. default_version stays 'stable'; sql/object_reference--stable.sql is regenerated from sql/object_reference.sql via make.

Also adds README.md (installation, roles/security, key concepts, and the full public API reference) and fixes packaging metadata in META.in.json/META.json: adds cat_tools to runtime.requires (a real, current dependency per object_reference.control), updates decibel/* org URLs to Postgres-Extensions/*, and bumps the stated PostgreSQL build requirement from 9.5.0 to 12.0.0, matching the floor this repo's CI matrix already exercises (derived from cat_tools's own build requirement).

Fixes #35

Co-Authored-By: Claude noreply@anthropic.com

@coderabbitai

coderabbitai Bot commented Aug 5, 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: 945490be-ba58-428a-a961-a2e3c360048a

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.

@jnasbyupgrade
jnasbyupgrade changed the base branch from master to master-pre-rollback August 5, 2026 20:27
@jnasbyupgrade
jnasbyupgrade force-pushed the reconcile-object-functions branch from 105ee2d to aa60049 Compare August 9, 2026 19:46
jnasbyupgrade added a commit that referenced this pull request Aug 9, 2026
…ript,

test/install/load.sql three-mode loader, dependency-guard anchor, and a
permanent schema-qualification pgTAP assertion

Implements advanced-extension-testing.md checklist items 1-6 on top of
PR #17 (reconcile-object-functions):

- PGXNTOOL_ENABLE_TEST_INSTALL / PGXNTOOL_ENABLE_VERIFY_RESULTS set
  explicitly; TEST_LOAD_SOURCE (fresh/update/existing) + TEST_UPDATE_FROM/TO
  make vars, parse-time validated, propagated as placeholder GUCs via
  PGOPTIONS; `make test-update` wrapper.
- test/install/load.sql: single committed-once installer for the extension,
  covering all three load modes, including a drop-first reset (with
  pg_temp.drop_role() for the extension's own global roles) and an
  existing-mode presence/version assertion.
- sql/object_reference--0.1.0--stable.sql: hand-authored update script (there
  was previously no update path at all from the only real historical release
  to current). Recreates every function/view that changed via the same
  private-helper-schema bootstrap/teardown convention the fresh install uses,
  so the update path is verified byte-for-byte structurally identical to a
  fresh install (function bodies, comments, ACLs, table/view columns).
- Makefile: DATA += sql/object_reference--0.1.0.sql (pgxntool#48 workaround,
  needed for CREATE EXTENSION ... VERSION '0.1.0' to work at all); a
  conditional count_nulls install step for the update-mode floor only (0.1.0's
  own install script still needs it, even though current object_reference no
  longer requires it).
- test/finish.sql: one permanent pgTAP assertion (modeled on
  pg_count_nulls'/extension_tools' own schema-qualification checks) proving
  object_reference/_object_reference are never resolved via search_path.
- Moved the pre-existing raw-source-load sanity check (test/sql/zzz_build.sql)
  to test/build/, pgxntool's own test-build feature: it needs a schema-free
  database to create `object_reference` manually in, which the committed-once
  installer above no longer provides in the shared main-suite database.

Dependency-guard anchor for a future existing-mode CI job: a view typed on
_object_reference.object's row type (object_reference-owned, never dropped or
redefined by the update script) blocks a non-CASCADE DROP EXTENSION; manually
proven to block the drop (and to keep blocking it after the update path) as
part of this PR's own verification, not committed as CI machinery yet.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@jnasbyupgrade
jnasbyupgrade changed the base branch from master-pre-rollback to master August 10, 2026 20:19
@jnasbyupgrade
jnasbyupgrade force-pushed the reconcile-object-functions branch from aa60049 to 03d21be Compare August 10, 2026 20:28
jnasbyupgrade added a commit that referenced this pull request Aug 10, 2026
…ript,

test/install/load.sql three-mode loader, dependency-guard anchor, and a
permanent schema-qualification pgTAP assertion

Implements advanced-extension-testing.md checklist items 1-6 on top of
PR #17 (reconcile-object-functions):

- PGXNTOOL_ENABLE_TEST_INSTALL / PGXNTOOL_ENABLE_VERIFY_RESULTS set
  explicitly; TEST_LOAD_SOURCE (fresh/update/existing) + TEST_UPDATE_FROM/TO
  make vars, parse-time validated, propagated as placeholder GUCs via
  PGOPTIONS; `make test-update` wrapper.
- test/install/load.sql: single committed-once installer for the extension,
  covering all three load modes, including a drop-first reset (with
  pg_temp.drop_role() for the extension's own global roles) and an
  existing-mode presence/version assertion.
- sql/object_reference--0.1.0--stable.sql: hand-authored update script (there
  was previously no update path at all from the only real historical release
  to current). Recreates every function/view that changed via the same
  private-helper-schema bootstrap/teardown convention the fresh install uses,
  so the update path is verified byte-for-byte structurally identical to a
  fresh install (function bodies, comments, ACLs, table/view columns).
- Makefile: DATA += sql/object_reference--0.1.0.sql (pgxntool#48 workaround,
  needed for CREATE EXTENSION ... VERSION '0.1.0' to work at all); a
  conditional count_nulls install step for the update-mode floor only (0.1.0's
  own install script still needs it, even though current object_reference no
  longer requires it).
- test/finish.sql: one permanent pgTAP assertion (modeled on
  pg_count_nulls'/extension_tools' own schema-qualification checks) proving
  object_reference/_object_reference are never resolved via search_path.
- Moved the pre-existing raw-source-load sanity check (test/sql/zzz_build.sql)
  to test/build/, pgxntool's own test-build feature: it needs a schema-free
  database to create `object_reference` manually in, which the committed-once
  installer above no longer provides in the shared main-suite database.

Dependency-guard anchor for a future existing-mode CI job: a view typed on
_object_reference.object's row type (object_reference-owned, never dropped or
redefined by the update script) blocks a non-CASCADE DROP EXTENSION; manually
proven to block the drop (and to keep blocking it after the update path) as
part of this PR's own verification, not committed as CI machinery yet.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Aug 10, 2026

Copy link
Copy Markdown

Claude finished @jnasbyupgrade's task in 8m 2s —— View job


Claude's Review

  • Gather context (diff, CLAUDE.md, CI status)
  • Review SQL changes (sql/object_reference.sql, control file, Makefile)
  • Review test changes (test/sql/*.sql, expected outputs)
  • Post review feedback

CI is green on this PR (make lint/make test both pass per the run linked below), and the diff matches what the PR description promises. Went through sql/object_reference.sql, the build/control changes, and both modified test files line-by-line against their expected/*.out counterparts.

What looks solid:

  • reg* pseudotype columns, null_count trigger, and their unique indexes are cleanly removed; classid/object_oid collapse correctly into plain oid, and _object_oid__add's EXECUTE-built dynamic insert is replaced with a plain static INSERT — good simplification.
  • count_nulls is fully excised (Makefile, control requires, test/deps.sql, test/load.sql, test/sql/zzz_build.sql) — no dangling references left anywhere except the frozen sql/object_reference--0.1.0.sql (expected, per repo convention) and the vendored pgxntool/README.*.
  • object__describe/object__identity are thin, correctly-wired wrappers; object__cleanup's WHEN foreign_key_violation THEN NULL pattern is a clean way to make cleanup best-effort, and the new AFTER DELETE trigger on object_group__object is placed appropriately.
  • The temp-schema guard in _object_reference._object_v__for_update (checking pg_identify_object(...).schema LIKE 'pg_temp%'/'pg_toast_temp%') runs before any row is written, and correctly no-ops when schema IS NULL (e.g. objects without a schema).
  • Manually recomputed the pgTAP plan() math against the actual assertion count for both test/sql/base.sql (10) and test/sql/object_group.sql (29) — both match the committed expected/*.out files exactly, including the __remove off-by-one that commit 3486c06 already self-corrected (nice catch, and good that it was verified against real CI output rather than just the stale committed .out file).
  • test/expected/zzz_build.out diff is just shifted line numbers / cascading NOTICEs from the shrunk _object_oid DDL — machine-regenerated noise, not hand-edited drift.

One non-blocking simplification worth considering: in sql/object_reference.sql, _object_oid.object_oid (~line 194) is now always set equal to objid_object_oid__add's insert (~line 302) does VALUES (object_id, classid, objid, objsubid, objid). That makes the objid_must_match CHECK constraint (objid IS NOT DISTINCT FROM object_oid, ~line 190) tautological, and object_oid itself redundant storage of objid. Since this is a private (_object_reference-schema) table, it'd be safe to drop the column and reference objid directly in the views/object__* functions and in test/sql/base.sql's "Verify object_oid field is correct" check — unless a later PR in this 3-PR stack intends object_oid to diverge from objid for some object type, in which case it'd be worth a short comment noting why it's kept separate now.
Fix this →

No blocking issues found. Nice, focused reconciliation PR — the count_nulls removal and reg* collapse are handled consistently across every file that touched them.
· Branch: reconcile-object-functions

@jnasbyupgrade jnasbyupgrade changed the title Remove reg* pseudotype columns; add object info functions (reconciles new_features) Remove reg* pseudotype columns; add object info functions Aug 10, 2026
@github-actions

github-actions Bot commented Aug 10, 2026

Copy link
Copy Markdown

Claude finished @jnasbyupgrade's task in 2m 8s —— View job


Claude's Review

  • Gather context (diff, CLAUDE.md, CI status)
  • Review SQL changes (sql/object_reference.sql, control file, Makefile)
  • Review test changes (test/sql/*.sql, expected outputs)
  • Post review feedback

CI is green (CI workflow run 31435600198 succeeded). This update adds two commits on top of what was previously reviewed:

9d909ce — Suppress NOTICEs during CREATE EXTENSION via SET LOCAL client_min_messages
Adds SET LOCAL client_min_messages = WARNING; near the top of sql/object_reference.sql (line 11) to silence the %TYPE resolution NOTICEs the script's many column-type references otherwise spam during install. SET LOCAL (not SET) is the correct choice here since it scopes to CREATE EXTENSION's implicit transaction and won't leak into the installing session. test/expected/zzz_build.out diff is exactly the now-suppressed NOTICE lines disappearing — matches the commit's intent.

a9d4a67 — Drop _object_oid.object_oid
This directly implements the non-blocking suggestion from the prior review round: since _object_oid__add's insert always set object_oid := objid and nothing else wrote to the table, the column and its objid_must_match CHECK were tautological. The commit cleanly removes both, updates the two views (_object_v, _object_v__for_update) to stop projecting object_oid, and repoints test/sql/base.sql's assertion at objid directly. Since _object_oid is a private _object_reference-schema table, there's no external API concern. test/expected/base.out/zzz_build.out diffs are consistent with a straight make results regeneration, not hand-edited.

Both commits are small, self-contained, and consistent with the rest of the stack (frozen sql/object_reference--0.1.0.sql and META files remain untouched, per repo convention). No new issues found — this addresses the only open item from the previous review pass.
· Branch: reconcile-object-functions

@github-actions

github-actions Bot commented Aug 10, 2026

Copy link
Copy Markdown

Claude finished @jnasbyupgrade's task in 1m 36s —— View job


Claude finished @jnasbyupgrade's task in 3m 12s ——

Reviewing latest changes

  • Gather context (diff since last review, CI status)
  • Review new commit(s)
  • Post review feedback

CI is green (CI run 31436646037 succeeded). Since the last review pass, one new commit was added:

3c06f4d — Fix multi-line comment to use block format, not consecutive -- lines

Converts the SET LOCAL client_min_messages = WARNING; explanation at the top of sql/object_reference.sql from a run of -- line comments to a proper /* ... */ block, per CODE_STYLE.md's rule against multi-line -- comments. The test/expected/zzz_build.out diff is exactly the resulting 2-line shift in the \echo-derived psql:test/temp_load.not_sql:NNN line numbers — consistent with a straight make results regeneration, not hand-edited drift.

This is a pure style/formatting fix with no behavioral change. No issues found — this addresses everything raised in prior review rounds (the object_oid redundancy from the first pass was already fixed in a9d4a67, confirmed in the second pass).

· Branch: reconcile-object-functions

@github-actions

github-actions Bot commented Aug 10, 2026

Copy link
Copy Markdown

Claude finished @jnasbyupgrade's task in 1m 48s —— View job


Reviewing latest changes

  • Gather context (diff since last review, CI status)
  • Review new commit(s)
  • Post review feedback

CI is green (CI run 31439158676 succeeded, including the PostgreSQL 12 leg). Since the last review pass, one new commit was added:

683cb57 — Add README.md and fix META packaging metadata (fixes #35)

  • README.md (new, 333 lines): installation, roles/security, key concepts, and full public API reference. Spot-checked every documented routine (object__getsert/object__getsert_w_group_id, object__describe/object__identity/object__cleanup, object_group__*, object__dependency__add/object_group__dependency__add, capture__start/stop/get_current/get_all, post_restore, unsupported/untested (+_srf variants)) against sql/object_reference.sql — all exist and match the documented signatures, so the "verified against current schema" claim in the commit message holds up.
  • META.in.json/META.json: adds cat_tools: 0 to runtime.requires, matching object_reference.control's requires = 'cat_tools' (line 5) — this was a real gap, since object_reference genuinely can't build/run without it. decibel/*Postgres-Extensions/* URL fixes are consistent — confirmed no other decibel org references remain anywhere in the tree outside the vendored pgxntool/ directory. The PostgreSQL build-requirement bump from 9.5.012.0.0 matches the actual floor the CI matrix exercises (jobs run PG 12–18).
  • Both META files were edited in lockstep (META.in.json is the hand-maintained source, META.json the generated artifact) — no drift between them.

One thing worth a mention purely for context: this commit touches META.in.json/META.json, whereas earlier review rounds on this PR noted those files were untouched — that's expected here since this commit is fixing pre-existing packaging metadata issues (tracked as #35) rather than being part of the reg*-column/object-info-function reconciliation work; it doesn't conflict with the "frozen sql/object_reference--0.1.0.sql" convention, which this commit correctly leaves alone.

No issues found. This is a clean, well-scoped documentation and metadata fix.
· Branch: reconcile-object-functions

jnasbyupgrade and others added 9 commits August 10, 2026 17:44
pgxn install --unstable cat_tools resolves to the newest release actually
published to the PGXN package index, which is still 0.2.1 (2017) and fails
standalone on modern PostgreSQL with "column oid specified more than once"
at CREATE EXTENSION. A fixed release, 0.3.0, is tagged in cat_tools' own
git repo but hasn't been uploaded to PGXN yet, so the Makefile's cat_tools
target now clones Postgres-Extensions/cat_tools at the 0.3.0 tag and
builds/installs it directly.

Since this is the first time object_reference's suite has actually run
against a real, working cat_tools, two small fallout fixes are needed:

- cat_tools.function__arg_types_text() is deprecated in 0.3.0 in favor of
  cat_tools.routine__parse_arg_types_text() (identical signature/body,
  just renamed, deprecated one emits a WARNING on every call). Switched
  object_reference's one call site to the non-deprecated name.
- cat_tools 0.3.0's object_type enum grew two new members, "partitioned
  table" and "partitioned index". pg_get_object_address() doesn't
  recognize either (only the base table/index types they derive from),
  so object_reference classifies them as unsupported, matching
  object_reference.unsupported()'s existing handling of "event trigger"
  for the same reason. test/sql/all.sql's sanity-check of the unsupported
  set is updated to match.

sql/object_reference--stable.sql and test/expected/zzz_build.out are
regenerated (make results) to match.

Extracted from PR #5, which had scope-crept into also carrying this fix
alongside the actual CI/pgxn-tools migration; splitting it out here so it
can be reviewed and merged independently.
…ls 0.3.0

pgxn install --unstable cat_tools now resolves to cat_tools 0.3.0 directly
(confirmed against the live PGXN index and by a clean CREATE EXTENSION
cat_tools; both locally and, once pushed, in the actual object_reference
CI run for #5's slimmed CI-migration branch -- it went fully green without
this Makefile change at all). The PGXN package index being stuck at the
broken, 2017-era 0.2.1 release was true when this fix was first written,
but isn't true anymore, so the git-clone-from-tag workaround has nothing
left to work around. Keeping it would leave a Makefile comment describing
a problem that no longer exists.

The SQL/test fixes (renamed function call, new object_type enum members
classified as unsupported) are unaffected -- those are needed regardless
of how cat_tools 0.3.0 gets installed.
Reconciles the substantive feature delta from new_features (PR #2) onto the
current 'stable' baseline (post PR #5/#16: pgxn-tools testing, cat_tools
0.3.0, and the linter):

- _object_reference._object_oid: drop the per-catalog regclass/regconfig/
  regdictionary/regnamespace/regoperator/regprocedure/regtype columns and
  their unique indexes plus the count_nulls-backed null_count trigger that
  enforced "exactly one is set". classid is now plain oid and object_oid
  (also NOT NULL) is the sole identifier column, so there's nothing left to
  arbitrate between.
- _object_reference._object_v / _object_v__for_update: drop the reg* columns
  from the column list to match.
- _object_reference._object_oid__add: replace the dynamic, format()-built
  INSERT that picked a reg* column based on cat_tools.object__reg_type()
  with a plain INSERT into object_oid.
- Drop the count_nulls search_path DO block (dead now that the trigger using
  it is gone) and the count_nulls dependency throughout (control, Makefile,
  test setup).
- Add object_reference.object__describe()/object__identity(), thin wrappers
  around pg_describe_object()/pg_identify_object(); and object__cleanup(),
  which best-effort deletes an object record (ignoring foreign_key_violation
  if it's still referenced elsewhere). Wire object__cleanup() up to a new
  AFTER DELETE trigger on object_group__object so removing an object from
  its last group automatically attempts cleanup.
- _object_v__for_update (the getsert core): refuse to track objects living
  in a pg_temp*/pg_toast_temp* schema, since a tracked reference would
  outlive the temporary object it points to.
- test/sql/object_group.sql: switch the two scratch tables from TEMP to
  regular tables (object__getsert now rejects temp objects) and add
  coverage for the new automatic-cleanup trigger.
- test/sql/base.sql: replace the count_nulls-relocation test (relocation
  was already unsupported and the whole extension no longer depends on
  count_nulls) with coverage for object_oid, object__describe(),
  object__identity(), and temp-object rejection.

sql/object_reference--0.1.0.sql (the frozen historical release) and the
META files are untouched. default_version stays 'stable'; sql/object_reference--stable.sql
is regenerated to match sql/object_reference.sql. make lint and make test
(including the dump/restore test) pass on both PostgreSQL 12 and 17.

Supersedes PR #2 (new_features) and, for the update/upgrade test
infrastructure built on top of it, sets up the rebuild of PR #3.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…> 5)

The __remove section runs 5 assertions (bogus_group=2, throws_ok=1,
lives_ok=2) but the plan math counted +4 + 2 = 6. Confirmed via
GitHub's own CI run for this branch: PostgreSQL 12 reported "planned
30 tests but ran 29" under make verify-results, the real pgtap-aware
gate -- invisible to plain pg_regress diffing since the stale count
was already baked into the committed expected-output file.

test/expected/object_group.out regenerated via make results, not
hand-edited.

Co-Authored-By: Claude <noreply@anthropic.com>
…sages

sql/object_reference.sql's many %TYPE column references (e.g.
_object_oid.objid%TYPE) each fire a NOTICE at parse time, spamming
CREATE EXTENSION's output for no reason a normal install needs to see.
SET LOCAL (not SET) so it reverts automatically at the end of CREATE
EXTENSION's implicit transaction rather than leaking into the
installing session.

Co-Authored-By: Claude <noreply@anthropic.com>
Before this stack, _object_oid had six separate reg*-typed columns
(one per object class) plus object_oid as a plain-oid projection of
whichever one applied to a given row -- a real distinction, since the
reg* columns bought per-class dump/rename safety and object_oid bought
a uniform plain-oid value for cross-class queries. This PR already
collapsed those six reg* columns down to the classid/objid/objsubid
triple (mirroring pg_get_object_address()'s own output), which removed
the only thing object_oid used to distill -- _object_oid__add's insert
already just set it to objid unconditionally, and nothing else ever
wrote to this table. classid/objid/objsubid live in the private
_object_reference schema, so there's no external API stability
concern with removing a column here.

Drops the now-vacuous objid_must_match CHECK along with the column,
and updates test/sql/base.sql's assertion to check objid directly.

test/expected/base.out and test/expected/zzz_build.out regenerated via
make results, not hand-edited.

Co-Authored-By: Claude <noreply@anthropic.com>
CODE_STYLE.md requires /* ... */ for multi-line SQL comments, never
multi-line -- line comments. Applies to the client_min_messages
explanation. test/expected/zzz_build.out regenerated via make results
to reflect the resulting line-number shift in temp_load.not_sql's
WARNING output.

Co-Authored-By: Claude <noreply@anthropic.com>
Adds a README documenting installation, roles, key concepts, and the
full public API, carried forward from PR #2 and verified against the
current schema (object__describe/identity/cleanup, capture__*, object
group functions).

Fixes META.in.json (source for the generated META.json): adds cat_tools
to runtime.requires (a real, current dependency per object_reference.control),
updates decibel/* org URLs to Postgres-Extensions/*, and bumps the stated
PostgreSQL build requirement from 9.5.0 to 12.0.0, matching the floor
already established by this repo's CI matrix (derived from cat_tools's
own 12.0.0 build requirement).

Co-Authored-By: Claude <noreply@anthropic.com>
…lict

The rebase onto master (after #16's linter merge) resolved a conflict
in the commented-out cat_tools schema-restriction block by keeping a
plain /* instead of master's /* EXCLUDED CODE: ... -- without it, the
linter demands " * " prefixes on every line of the commented-out DO
block, producing 15 false findings. make lint is clean again.

Co-Authored-By: Claude <noreply@anthropic.com>
@jnasbyupgrade
jnasbyupgrade force-pushed the reconcile-object-functions branch from 683cb57 to f4bb263 Compare August 10, 2026 22:54
@github-actions

github-actions Bot commented Aug 10, 2026

Copy link
Copy Markdown

Claude finished @jnasbyupgrade's task in 1m 24s —— View job


Reviewing latest changes

  • Gather context (diff since last review, CI status)
  • Review new commit(s)
  • Post review feedback

CI is green (CI run 31440232562 succeeded). The branch was rebased onto master since the last review (commit hashes for previously-reviewed commits changed, e.g. 683cb577f58f0e), and one new commit was added on top:

f4bb263 — Restore EXCLUDED CODE marker lost during the linter-merge rebase conflict

During the rebase onto master (which now includes #16's SQL style linter), a conflict in the commented-out cat_tools schema-restriction DO $$ ... $$ block (sql/object_reference.sql line 15) was resolved by keeping a plain /* instead of master's /* EXCLUDED CODE: ... */ marker convention. This one-line fix restores the marker:

-/*
+/* EXCLUDED CODE: schema-restriction check below not currently enforced

I checked this against the linter's existing usage elsewhere in the repo (test/deps.sql:5, test/sql/object_group.sql:87,112, test/helpers/object_table.sql:165, test/sql/capture.sql:137) — the /* EXCLUDED CODE[: reason] format matches the established convention exactly, and this is the only such block in sql/object_reference.sql. Without the marker the linter would demand " * "-prefixed lines throughout the commented-out block, so this is a correct, minimal fix (1 file, +1/-1) with no behavioral change to the extension itself.

Confirmed the overall PR diff against master (14 files, +536/-161) still matches exactly what was described across all prior review rounds — this rebase only replayed existing commits plus this fix, it didn't introduce scope changes.

No issues found.
· Branch: reconcile-object-functions

… test

An extension's own install script shouldn't unilaterally change a
session setting on its caller's behalf, even scoped via SET LOCAL --
that's the caller's call to make, not the extension's. Moved the
NOTICE suppression out of sql/object_reference.sql entirely; it turns
out only zzz_build's raw \i load (not the normal CREATE EXTENSION path
every other test uses) ever surfaced the %TYPE resolution NOTICEs in
the first place, so the fix belongs in that one test file, wrapped in
the transaction setup.sql already opens.

test/expected/zzz_build.out regenerated via make results (line-number
shift only, from the extension script shrinking).

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions

github-actions Bot commented Aug 10, 2026

Copy link
Copy Markdown

Claude finished @jnasbyupgrade's task in 1m 11s —— View job


Reviewing latest changes

  • Gather context (diff since last review, CI status)
  • Review new commit(s)
  • Post review feedback

CI is green (CI run 31441782137 succeeded). Since the last review pass, one new commit was added:

fad854d — Move client_min_messages suppression from the extension script to the test

  • Removes the SET LOCAL client_min_messages = WARNING; block from sql/object_reference.sql (added two review-rounds ago), on the reasoning that an extension's install script shouldn't unilaterally change a session setting for its caller, even scoped via SET LOCAL.
  • Moves the suppression into test/sql/zzz_build.sql instead, right before the raw \i test/temp_load.not_sql load — this is the one test path that bypasses CREATE EXTENSION (loading the script directly via \i), so it's the only place these %TYPE-resolution NOTICEs actually surfaced. I confirmed test/pgxntool/setup.sql:2 opens with BEGIN;, so the SET LOCAL here correctly reverts at that transaction's end rather than leaking — the comment's claim checks out.
  • test/expected/zzz_build.out diff is exactly the line-number shifts you'd expect from the extension script shrinking by 10 lines (e.g. temp_load.not_sql:186176, 435425, etc.) — consistent with a straight make results regeneration, not hand-edited drift.
  • Full branch diff vs. origin/master still matches the PR description exactly (14 files, +538/-164).

This is a good call — it correctly narrows the workaround's blast radius to the one test that needed it, rather than having the shipped extension mutate a session-level setting on every install. No issues found.
· Branch: reconcile-object-functions

@jnasbyupgrade
jnasbyupgrade merged commit c04df7d into master Aug 11, 2026
12 checks passed
@jnasbyupgrade
jnasbyupgrade deleted the reconcile-object-functions branch August 11, 2026 17:22
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.

PR #2 content not carried into #17: README.md and META.json/META.in.json metadata fixes missing

1 participant