You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove reg* pseudotype columns; add object info functions
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>
0 commit comments