Commit aa60049
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>1 parent 0f68d1a commit aa60049
12 files changed
Lines changed: 333 additions & 230 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | 25 | | |
31 | 26 | | |
32 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | 6 | | |
18 | 7 | | |
19 | 8 | | |
| |||
192 | 181 | | |
193 | 182 | | |
194 | 183 | | |
195 | | - | |
| 184 | + | |
196 | 185 | | |
197 | 186 | | |
198 | 187 | | |
199 | 188 | | |
200 | 189 | | |
201 | 190 | | |
202 | 191 | | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
| 192 | + | |
213 | 193 | | |
214 | 194 | | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
| 195 | + | |
232 | 196 | | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | 197 | | |
248 | 198 | | |
249 | 199 | | |
| |||
303 | 253 | | |
304 | 254 | | |
305 | 255 | | |
306 | | - | |
307 | | - | |
308 | | - | |
309 | | - | |
310 | | - | |
311 | | - | |
312 | | - | |
313 | 256 | | |
314 | 257 | | |
315 | 258 | | |
| |||
325 | 268 | | |
326 | 269 | | |
327 | 270 | | |
328 | | - | |
329 | | - | |
330 | | - | |
331 | | - | |
332 | | - | |
333 | | - | |
334 | | - | |
335 | 271 | | |
336 | 272 | | |
337 | 273 | | |
| |||
363 | 299 | | |
364 | 300 | | |
365 | 301 | | |
366 | | - | |
367 | | - | |
368 | | - | |
369 | | - | |
370 | | - | |
371 | | - | |
372 | | - | |
373 | | - | |
374 | | - | |
375 | | - | |
376 | | - | |
377 | | - | |
378 | 302 | | |
379 | | - | |
380 | | - | |
381 | | - | |
382 | | - | |
383 | | - | |
384 | | - | |
385 | | - | |
| 303 | + | |
| 304 | + | |
386 | 305 | | |
387 | 306 | | |
388 | 307 | | |
| |||
632 | 551 | | |
633 | 552 | | |
634 | 553 | | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
635 | 572 | | |
636 | 573 | | |
637 | 574 | | |
| |||
836 | 773 | | |
837 | 774 | | |
838 | 775 | | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
839 | 839 | | |
840 | 840 | | |
841 | 841 | | |
| |||
855 | 855 | | |
856 | 856 | | |
857 | 857 | | |
| 858 | + | |
858 | 859 | | |
859 | 860 | | |
860 | 861 | | |
| |||
883 | 884 | | |
884 | 885 | | |
885 | 886 | | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
886 | 896 | | |
887 | 897 | | |
888 | 898 | | |
| |||
0 commit comments