Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fbb99e5

Browse files
committed
Update oidjoins regression test for v11.
Commit 86f5759 already manually updated the oidjoins test for the new pg_constraint.conparentid => pg_constraint.oid relationship, but failed to update findoidjoins/README, thus the apparent inconsistency here. Michael Paquier Discussion: https://postgr.es/m/[email protected]
1 parent 513ff52 commit fbb99e5

File tree

3 files changed

+17
-3
lines changed

3 files changed

+17
-3
lines changed

src/test/regress/expected/oidjoins.out

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -761,6 +761,14 @@ WHERE partrelid != 0 AND
761761
------+-----------
762762
(0 rows)
763763

764+
SELECT ctid, partdefid
765+
FROM pg_catalog.pg_partitioned_table fk
766+
WHERE partdefid != 0 AND
767+
NOT EXISTS(SELECT 1 FROM pg_catalog.pg_class pk WHERE pk.oid = fk.partdefid);
768+
ctid | partdefid
769+
------+-----------
770+
(0 rows)
771+
764772
SELECT ctid, polrelid
765773
FROM pg_catalog.pg_policy fk
766774
WHERE polrelid != 0 AND

src/test/regress/sql/oidjoins.sql

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,10 @@ SELECT ctid, partrelid
381381
FROM pg_catalog.pg_partitioned_table fk
382382
WHERE partrelid != 0 AND
383383
NOT EXISTS(SELECT 1 FROM pg_catalog.pg_class pk WHERE pk.oid = fk.partrelid);
384+
SELECT ctid, partdefid
385+
FROM pg_catalog.pg_partitioned_table fk
386+
WHERE partdefid != 0 AND
387+
NOT EXISTS(SELECT 1 FROM pg_catalog.pg_class pk WHERE pk.oid = fk.partdefid);
384388
SELECT ctid, polrelid
385389
FROM pg_catalog.pg_policy fk
386390
WHERE polrelid != 0 AND

src/tools/findoidjoins/README

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ findoidjoins
55

66
This program scans a database and prints oid fields (also reg* fields)
77
and the tables they join to. It is normally used to check the system
8-
catalog join relationships (shown below for 10devel as of 2017-05-15).
8+
catalog join relationships (shown below for 11devel as of 2018-05-07).
99

1010
Historically this has been run against an empty database such as template1,
1111
but there's a problem with that approach: some of the catalogs are empty
@@ -16,7 +16,7 @@ catalogs in interesting ways.
1616
Note that unexpected matches may indicate bogus entries in system tables;
1717
don't accept a peculiar match without question. In particular, a field
1818
shown as joining to more than one target table is probably messed up.
19-
In v10, the *only* fields that should join to more than one target
19+
Currently, the *only* fields that should join to more than one target
2020
table are:
2121
pg_description.objoid, pg_depend.objid, pg_depend.refobjid,
2222
pg_shdescription.objoid, pg_shdepend.objid, pg_shdepend.refobjid,
@@ -35,7 +35,7 @@ regression test. The oidjoins test should be updated after any
3535
revision in the patterns of cross-links between system tables.
3636
(Typically we update it at the end of each development cycle.)
3737

38-
NOTE: as of v10, make_oidjoins_check produces two bogus join checks:
38+
NOTE: currently, make_oidjoins_check produces two bogus join checks:
3939
Join pg_catalog.pg_class.relfilenode => pg_catalog.pg_class.oid
4040
Join pg_catalog.pg_database.datlastsysoid => pg_catalog.pg_database.oid
4141
These are artifacts and should not be added to the oidjoins regression test.
@@ -106,6 +106,7 @@ Join pg_catalog.pg_constraint.connamespace => pg_catalog.pg_namespace.oid
106106
Join pg_catalog.pg_constraint.conrelid => pg_catalog.pg_class.oid
107107
Join pg_catalog.pg_constraint.contypid => pg_catalog.pg_type.oid
108108
Join pg_catalog.pg_constraint.conindid => pg_catalog.pg_class.oid
109+
Join pg_catalog.pg_constraint.conparentid => pg_catalog.pg_constraint.oid
109110
Join pg_catalog.pg_constraint.confrelid => pg_catalog.pg_class.oid
110111
Join pg_catalog.pg_conversion.connamespace => pg_catalog.pg_namespace.oid
111112
Join pg_catalog.pg_conversion.conowner => pg_catalog.pg_authid.oid
@@ -154,6 +155,7 @@ Join pg_catalog.pg_opfamily.opfmethod => pg_catalog.pg_am.oid
154155
Join pg_catalog.pg_opfamily.opfnamespace => pg_catalog.pg_namespace.oid
155156
Join pg_catalog.pg_opfamily.opfowner => pg_catalog.pg_authid.oid
156157
Join pg_catalog.pg_partitioned_table.partrelid => pg_catalog.pg_class.oid
158+
Join pg_catalog.pg_partitioned_table.partdefid => pg_catalog.pg_class.oid
157159
Join pg_catalog.pg_policy.polrelid => pg_catalog.pg_class.oid
158160
Join pg_catalog.pg_proc.pronamespace => pg_catalog.pg_namespace.oid
159161
Join pg_catalog.pg_proc.proowner => pg_catalog.pg_authid.oid

0 commit comments

Comments
 (0)