Commit 324505af authored by Tom Lane's avatar Tom Lane

Update oidjoins regression test for 9.0.

parent 66cac8fe
......@@ -377,6 +377,14 @@ WHERE dattablespace != 0 AND
------+---------------
(0 rows)
SELECT ctid, setdatabase
FROM pg_catalog.pg_db_role_setting fk
WHERE setdatabase != 0 AND
NOT EXISTS(SELECT 1 FROM pg_catalog.pg_database pk WHERE pk.oid = fk.setdatabase);
ctid | setdatabase
------+-------------
(0 rows)
SELECT ctid, classid
FROM pg_catalog.pg_depend fk
WHERE classid != 0 AND
......@@ -425,6 +433,22 @@ WHERE lanowner != 0 AND
------+----------
(0 rows)
SELECT ctid, lanplcallfoid
FROM pg_catalog.pg_language fk
WHERE lanplcallfoid != 0 AND
NOT EXISTS(SELECT 1 FROM pg_catalog.pg_proc pk WHERE pk.oid = fk.lanplcallfoid);
ctid | lanplcallfoid
------+---------------
(0 rows)
SELECT ctid, laninline
FROM pg_catalog.pg_language fk
WHERE laninline != 0 AND
NOT EXISTS(SELECT 1 FROM pg_catalog.pg_proc pk WHERE pk.oid = fk.laninline);
ctid | laninline
------+-----------
(0 rows)
SELECT ctid, lanvalidator
FROM pg_catalog.pg_language fk
WHERE lanvalidator != 0 AND
......@@ -689,22 +713,6 @@ WHERE spcowner != 0 AND
------+----------
(0 rows)
SELECT ctid, tgrelid
FROM pg_catalog.pg_trigger fk
WHERE tgrelid != 0 AND
NOT EXISTS(SELECT 1 FROM pg_catalog.pg_class pk WHERE pk.oid = fk.tgrelid);
ctid | tgrelid
------+---------
(0 rows)
SELECT ctid, tgfoid
FROM pg_catalog.pg_trigger fk
WHERE tgfoid != 0 AND
NOT EXISTS(SELECT 1 FROM pg_catalog.pg_proc pk WHERE pk.oid = fk.tgfoid);
ctid | tgfoid
------+--------
(0 rows)
SELECT ctid, cfgnamespace
FROM pg_catalog.pg_ts_config fk
WHERE cfgnamespace != 0 AND
......
......@@ -189,6 +189,10 @@ SELECT ctid, dattablespace
FROM pg_catalog.pg_database fk
WHERE dattablespace != 0 AND
NOT EXISTS(SELECT 1 FROM pg_catalog.pg_tablespace pk WHERE pk.oid = fk.dattablespace);
SELECT ctid, setdatabase
FROM pg_catalog.pg_db_role_setting fk
WHERE setdatabase != 0 AND
NOT EXISTS(SELECT 1 FROM pg_catalog.pg_database pk WHERE pk.oid = fk.setdatabase);
SELECT ctid, classid
FROM pg_catalog.pg_depend fk
WHERE classid != 0 AND
......@@ -213,6 +217,14 @@ SELECT ctid, lanowner
FROM pg_catalog.pg_language fk
WHERE lanowner != 0 AND
NOT EXISTS(SELECT 1 FROM pg_catalog.pg_authid pk WHERE pk.oid = fk.lanowner);
SELECT ctid, lanplcallfoid
FROM pg_catalog.pg_language fk
WHERE lanplcallfoid != 0 AND
NOT EXISTS(SELECT 1 FROM pg_catalog.pg_proc pk WHERE pk.oid = fk.lanplcallfoid);
SELECT ctid, laninline
FROM pg_catalog.pg_language fk
WHERE laninline != 0 AND
NOT EXISTS(SELECT 1 FROM pg_catalog.pg_proc pk WHERE pk.oid = fk.laninline);
SELECT ctid, lanvalidator
FROM pg_catalog.pg_language fk
WHERE lanvalidator != 0 AND
......@@ -345,14 +357,6 @@ SELECT ctid, spcowner
FROM pg_catalog.pg_tablespace fk
WHERE spcowner != 0 AND
NOT EXISTS(SELECT 1 FROM pg_catalog.pg_authid pk WHERE pk.oid = fk.spcowner);
SELECT ctid, tgrelid
FROM pg_catalog.pg_trigger fk
WHERE tgrelid != 0 AND
NOT EXISTS(SELECT 1 FROM pg_catalog.pg_class pk WHERE pk.oid = fk.tgrelid);
SELECT ctid, tgfoid
FROM pg_catalog.pg_trigger fk
WHERE tgfoid != 0 AND
NOT EXISTS(SELECT 1 FROM pg_catalog.pg_proc pk WHERE pk.oid = fk.tgfoid);
SELECT ctid, cfgnamespace
FROM pg_catalog.pg_ts_config fk
WHERE cfgnamespace != 0 AND
......
$PostgreSQL: pgsql/src/tools/findoidjoins/README,v 1.6 2008/10/13 12:59:57 tgl Exp $
$PostgreSQL: pgsql/src/tools/findoidjoins/README,v 1.7 2010/03/14 04:17:54 tgl Exp $
findoidjoins
============
......@@ -9,10 +9,10 @@ anything but an empty database, such as template1; else it's likely to
be very slow.
Run on an empty database, it returns the system join relationships (shown
below for 8.4devel). Note that unexpected matches may indicate bogus entries
below for 9.0devel). Note that unexpected matches may indicate bogus entries
in system tables --- don't accept a peculiar match without question.
In particular, a field shown as joining to more than one target table is
probably messed up. In 8.4devel, the *only* fields that should join to more
probably messed up. In 9.0devel, the *only* fields that should join to more
than one target are pg_description.objoid, pg_depend.objid,
pg_depend.refobjid, pg_shdescription.objoid, pg_shdepend.objid, and
pg_shdepend.refobjid. (Running make_oidjoins_check is an easy way to spot
......@@ -31,7 +31,7 @@ revision in the patterns of cross-links between system tables.
(Ideally we'd just regenerate the script as part of the regression
tests themselves, but that seems too slow...)
NOTE: in 8.4devel, make_oidjoins_check produces two bogus join checks:
NOTE: in 9.0devel, make_oidjoins_check produces two bogus join checks:
Join pg_catalog.pg_class.relfilenode => pg_catalog.pg_class.oid
Join pg_catalog.pg_database.datlastsysoid => pg_catalog.pg_database.oid
These are artifacts and should not be added to the oidjoins regress test.
......@@ -87,12 +87,15 @@ Join pg_catalog.pg_conversion.conowner => pg_catalog.pg_authid.oid
Join pg_catalog.pg_conversion.conproc => pg_catalog.pg_proc.oid
Join pg_catalog.pg_database.datdba => pg_catalog.pg_authid.oid
Join pg_catalog.pg_database.dattablespace => pg_catalog.pg_tablespace.oid
Join pg_catalog.pg_db_role_setting.setdatabase => pg_catalog.pg_database.oid
Join pg_catalog.pg_depend.classid => pg_catalog.pg_class.oid
Join pg_catalog.pg_depend.refclassid => pg_catalog.pg_class.oid
Join pg_catalog.pg_description.classoid => pg_catalog.pg_class.oid
Join pg_catalog.pg_index.indexrelid => pg_catalog.pg_class.oid
Join pg_catalog.pg_index.indrelid => pg_catalog.pg_class.oid
Join pg_catalog.pg_language.lanowner => pg_catalog.pg_authid.oid
Join pg_catalog.pg_language.lanplcallfoid => pg_catalog.pg_proc.oid
Join pg_catalog.pg_language.laninline => pg_catalog.pg_proc.oid
Join pg_catalog.pg_language.lanvalidator => pg_catalog.pg_proc.oid
Join pg_catalog.pg_namespace.nspowner => pg_catalog.pg_authid.oid
Join pg_catalog.pg_opclass.opcmethod => pg_catalog.pg_am.oid
......@@ -126,8 +129,6 @@ Join pg_catalog.pg_statistic.staop1 => pg_catalog.pg_operator.oid
Join pg_catalog.pg_statistic.staop2 => pg_catalog.pg_operator.oid
Join pg_catalog.pg_statistic.staop3 => pg_catalog.pg_operator.oid
Join pg_catalog.pg_tablespace.spcowner => pg_catalog.pg_authid.oid
Join pg_catalog.pg_trigger.tgrelid => pg_catalog.pg_class.oid
Join pg_catalog.pg_trigger.tgfoid => pg_catalog.pg_proc.oid
Join pg_catalog.pg_ts_config.cfgnamespace => pg_catalog.pg_namespace.oid
Join pg_catalog.pg_ts_config.cfgowner => pg_catalog.pg_authid.oid
Join pg_catalog.pg_ts_config.cfgparser => pg_catalog.pg_ts_parser.oid
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment