Add object functions, modernize CI, and remove reg* pseudotypes - #2
Add object functions, modernize CI, and remove reg* pseudotypes#2jnasbyupgrade wants to merge 34 commits into
Conversation
e9c24de Fix pg_regress on versions > 12 (Postgres-Extensions#5) c0af00f Improvements to HISTORY.asc 6e8f2a7 Allow use of sudo when installing an extension 705f1ec Don't run clean as part of make test 370fa8e Create test/sql during setup git-subtree-dir: pgxntool git-subtree-split: e9c24de986ddc85bbd1fb3149076888d075ce100
Use of those types is not supported by pg_upgrade
Also, add missing cat_tools requirement to META.in
Also, add missing cat_tools requirement to META.in
…nce into new_features
dbe7b50 to
40625c2
Compare
3b8cb2a Stamp 1.1.0 550a901 Remove commit.md (maintained in pgxntool-test) d73ca93 Add unique test database names to prevent conflicts (Postgres-Extensions#13) 9b344be Add update-setup-files.sh for 3-way merging after pgxntool-sync (Postgres-Extensions#12) ab7f6e2 Stamp 1.0.0 3a571ba Add pg_tle support and modernize test infrastructure (Postgres-Extensions#11) b96ea6d Add support for Claude code; build and doc improvements (Postgres-Extensions#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 (Postgres-Extensions#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>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
@claude please review this PR. |
|
Claude finished @jnasbyupgrade's task in 7m 3s —— View job Review of this PRTodo list
This is a solid PR overall — the object info functions ( 1.
|
…01f6b49d956abc6 # Conflicts: # pgxntool/.gitattributes # pgxntool/CLAUDE.md # pgxntool/HISTORY.asc # pgxntool/README.asc # pgxntool/README.html # pgxntool/base.mk # pgxntool/control.mk.sh # pgxntool/lib.sh # pgxntool/pgtle.sh # pgxntool/pgtle_versions.md # pgxntool/setup.sh # pgxntool/update-setup-files.sh # sql/object_reference--0.1.0.sql
Verified directly: pg_get_object_address('partitioned table', ...) throws
"unrecognized object type" -- PostgreSQL's real object-address API only
knows the base "table"/"index" object types cat_tools's "partitioned table"/
"partitioned index" are derived from. object_reference actively calls
pg_get_object_address() on every object_type it tracks (not just in the
disabled sanity CHECK), so these two types would break identity tracking
outright rather than merely lacking test coverage -- the earlier "untested"
classification undersold the actual constraint.
Matches the classification (and the exact reasoning/wording) already landed
independently on the separate, longer-running new_features branch (PR #2),
which reaches unsupported() via the same cat_tools 0.3.0 enum growth. Update
test/sql/all.sql's own sanity-check of the unsupported set to match.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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>
Uh oh!
There was an error while loading. Please reload this page.