Skip to content

Add object functions, modernize CI, and remove reg* pseudotypes#2

Open
jnasbyupgrade wants to merge 33 commits into
Postgres-Extensions:masterfrom
jnasbyupgrade:new_features
Open

Add object functions, modernize CI, and remove reg* pseudotypes#2
jnasbyupgrade wants to merge 33 commits into
Postgres-Extensions:masterfrom
jnasbyupgrade:new_features

Conversation

@jnasbyupgrade

@jnasbyupgrade jnasbyupgrade commented Jan 22, 2026

Copy link
Copy Markdown
Contributor
  • Add object__cleanup()
  • Add functions to retrieve object info
  • Disallow tracking objects in temp schemas
  • Mark partitioned table/index as unsupported
  • Stop using reg* pseudotypes in tables
  • Add README documenting the framework and API
  • Switch to pgxn-tools based testing
  • Update pgxntool

3b8cb2a Stamp 1.1.0
550a901 Remove commit.md (maintained in pgxntool-test)
d73ca93 Add unique test database names to prevent conflicts (#13)
9b344be Add update-setup-files.sh for 3-way merging after pgxntool-sync (#12)
ab7f6e2 Stamp 1.0.0
3a571ba Add pg_tle support and modernize test infrastructure (#11)
b96ea6d Add support for Claude code; build and doc improvements (#9)

git-subtree-dir: pgxntool
git-subtree-split: 3b8cb2a96c2611bb44b1d69fd533fd0f23fa8995
Switching to pgxntool's new best practice of keeping versioned SQL files in git.
pg_identify_object_as_address() returns these as plain "table"/"index",
and pg_get_object_address() doesn't recognize "partitioned table" or
"partitioned index" at all, so the round-trip is broken.
pgxntool now assumes versioned files are checked in, so do that, but
bump our version first. Also, add 0.1.0 from pgxn.
639756c Stamp 1.1.1
6ba3176 Fix pg_tle exception handler and empty upgrade files (#15)

git-subtree-dir: pgxntool
git-subtree-split: 639756c43a64717347b82b46acfec5be478a7bbf
new_features lacked the CI-monitoring instructions that already exist on
master, so sessions working here didn't watch CI after pushes. Copy them
over verbatim.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 12, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@jnasbyupgrade, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 5 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 6841b924-cf7f-4d6d-9f8d-40a70c3e87ef

📥 Commits

Reviewing files that changed from the base of the PR and between d191ef1 and ca6f1d5.

⛔ Files ignored due to path filters (3)
  • test/expected/base.out is excluded by !**/*.out
  • test/expected/object_group.out is excluded by !**/*.out
  • test/expected/zzz_build.out is excluded by !**/*.out
📒 Files selected for processing (40)
  • .github/workflows/ci.yml
  • .gitignore
  • .travis.yml
  • CLAUDE.md
  • META.in.json
  • META.json
  • Makefile
  • README.md
  • object_reference.control
  • pg-travis-test.sh
  • pgxntool/.claude/settings.json
  • pgxntool/.gitattributes
  • pgxntool/.gitignore
  • pgxntool/CLAUDE.md
  • pgxntool/HISTORY.asc
  • pgxntool/LICENSE
  • pgxntool/README.asc
  • pgxntool/README.html
  • pgxntool/_.gitignore
  • pgxntool/base.mk
  • pgxntool/build_meta.sh
  • pgxntool/control.mk.sh
  • pgxntool/lib.sh
  • pgxntool/make_results.sh
  • pgxntool/meta.mk.sh
  • pgxntool/pgtle.sh
  • pgxntool/pgtle_versions.md
  • pgxntool/setup.sh
  • pgxntool/update-setup-files.sh
  • sql/.object_reference.sql.swo
  • sql/object_reference--0.1.0.sql
  • sql/object_reference--0.2.0.sql
  • sql/object_reference.sql
  • test/deps.sql
  • test/dump/run.sh
  • test/load.sql
  • test/sql/all.sql
  • test/sql/base.sql
  • test/sql/object_group.sql
  • test/sql/zzz_build.sql
✨ 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

Copy link
Copy Markdown
Contributor Author

@claude please review this PR.

@claude

claude Bot commented Jul 14, 2026

Copy link
Copy Markdown

Claude finished @jnasbyupgrade's task in 7m 3s —— View job


Review of this PR

Todo list

  • Gather context (diff vs origin/master, read changed SQL/README/CI files)
  • Review SQL changes (object__cleanup, new functions, reg* pseudotype removal, partitioned table/index handling, temp schema exclusion)
  • Review CI/build changes (ci.yml, pgxntool updates, Makefile)
  • Review README documentation
  • Post final review feedback

This is a solid PR overall — the object info functions (object__describe, object__identity), the temp-schema rejection check, the object__cleanup() trigger, and the reg* pseudotype removal are all clean, well-tested changes, and the new README is a good addition. A few issues worth fixing before merge:

1. object_reference.control still requires count_nulls (bug)

object_reference.control:5 still has:

requires = 'cat_tools, count_nulls'

This PR removes the count_nulls dependency from sql/object_reference.sql (the search_path DO block and the null_count trigger using not_null_count_trigger are both gone), and META.json/META.in.json correctly list only cat_tools under runtime requires. The control file wasn't updated to match, so CREATE EXTENSION object_reference will still try to pull in count_nulls unnecessarily.
Fix this →

2. CI failure detection likely never triggers (bug)

.github/workflows/ci.yml:17-26:

- name: Test on PostgreSQL ${{ matrix.pg }}
  run: make test PGUSER=postgres
  continue-on-error: true
- name: Output failed results
  run: |
    if [ -e test/regression.out ]; then
      ...
      exit 1

pgxntool/base.mk:122 (and pg_regress itself) writes test failures to regression.diffs, not regression.out. Since test/regression.out is not the file pg_regress uses to signal failure, this existence check will likely never be true, and combined with continue-on-error: true on the test step, the job will report green even when tests actually fail. Given "switch to pgxn-tools based testing" is a stated goal of this PR, this is worth double-checking — the check should probably look at test/regression.diffs instead.
Fix this →

3. _object_oid.object_oid is now a redundant duplicate column (simplification)

After removing the reg* pseudotype columns, _object_reference._object_oid has:

objid       oid NOT NULL
...
CONSTRAINT objid_must_match CHECK( objid IS NOT DISTINCT FROM object_oid )
...
object_oid  oid NOT NULL

and every insert path (_object_oid__add, _object_v__for_update) sets object_oid to the same value as objid. With the reg* columns gone, object_oid no longer serves a distinguishing purpose — it's always identical to objid. Worth dropping the column (and simplifying _object_v/_object_v__for_update) unless there's a forward-looking reason to keep it.
Fix this →

4. Pre-existing bug spotted nearby: undefined r_object in fix_refs()

Not introduced by this PR, but adjacent to the object-cleanup/group changes: in _object_reference.fix_refs() (sql/object_reference.sql), the WHEN r_object_v.ids_exist THEN branch references r_object.object_id in both its RAISE WARNING and RAISE statements, but only r_object_v is declared — there is no r_object variable. This branch will error at runtime ("missing FROM-clause entry for table r_object") whenever it's hit. Since you're already touching this file, might be worth a quick fix.
Fix this →


Note: this environment only allows a curated set of Bash commands without interactive approval (some git subcommands, Read/Grep/Glob), so I wasn't able to actually spin up PostgreSQL and run make test to confirm the CI-detection issue empirically — the analysis above is based on static reading of pgxntool/base.mk, ci.yml, and PostgreSQL/pg_regress conventions. Worth confirming by watching an actual CI run with a deliberately failing test.

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