Commit c04df7d
authored
Remove reg* pseudotype columns; add object info functions (#17)
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.1 parent 94a9272 commit c04df7d
14 files changed
Lines changed: 538 additions & 164 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
| 61 | + | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
67 | | - | |
| 66 | + | |
| 67 | + | |
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
| 79 | + | |
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| 84 | + | |
84 | 85 | | |
85 | 86 | | |
86 | 87 | | |
| |||
95 | 96 | | |
96 | 97 | | |
97 | 98 | | |
98 | | - | |
| 99 | + | |
99 | 100 | | |
100 | 101 | | |
101 | 102 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
| 59 | + | |
60 | 60 | | |
61 | | - | |
| 61 | + | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
65 | | - | |
| 64 | + | |
| 65 | + | |
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
| 77 | + | |
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| 82 | + | |
82 | 83 | | |
83 | 84 | | |
84 | 85 | | |
| |||
92 | 93 | | |
93 | 94 | | |
94 | 95 | | |
95 | | - | |
| 96 | + | |
96 | 97 | | |
97 | 98 | | |
98 | 99 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | 18 | | |
24 | 19 | | |
25 | 20 | | |
| |||
0 commit comments