44This program scans a database, and prints oid fields (also regproc fields)
55and the tables they join to. CAUTION: it is ver-r-r-y slow on a large
66database, or even a not-so-large one. We don't really recommend running
7- it on anything but an empty database.
7+ it on anything but an empty database, such as template1 .
88
99Uses pgeasy library.
1010
1111Run on an empty database, it returns the system join relationships (shown
12- below for6.5 ). Note that unexpected matches may indicate bogus entries
12+ below for7.0 ). Note that unexpected matches may indicate bogus entries
1313in system tables --- don't accept a peculiar match without question.
1414In particular, a field shown as joining to more than one target table is
15- probably messed up. In6.5 , the *only* field that should join to more
15+ probably messed up. In7.0 , the *only* field that should join to more
1616than one target is pg_description.objoid. (Running make_oidjoins_check
1717is an easy way to spot fields joining to more than one table, BTW.)
1818
@@ -45,11 +45,10 @@ Join pg_am.amendscan => pg_proc.oid
4545Join pg_am.ammarkpos => pg_proc.oid
4646Join pg_am.amrestrpos => pg_proc.oid
4747Join pg_am.ambuild => pg_proc.oid
48+ Join pg_am.amcostestimate => pg_proc.oid
4849Join pg_amop.amopid => pg_am.oid
4950Join pg_amop.amopclaid => pg_opclass.oid
5051Join pg_amop.amopopr => pg_operator.oid
51- Join pg_amop.amopselect => pg_proc.oid
52- Join pg_amop.amopnpages => pg_proc.oid
5352Join pg_amproc.amid => pg_am.oid
5453Join pg_amproc.amopclaid => pg_opclass.oid
5554Join pg_amproc.amproc => pg_proc.oid
@@ -75,6 +74,10 @@ Join pg_operator.oprjoin => pg_proc.oid
7574Join pg_proc.prolang => pg_language.oid
7675Join pg_proc.prorettype => pg_type.oid
7776Join pg_rewrite.ev_class => pg_class.oid
77+ Join pg_statistic.starelid => pg_class.oid
78+ Join pg_statistic.staop => pg_operator.oid
79+ Join pg_trigger.tgrelid => pg_class.oid
80+ Join pg_trigger.tgfoid => pg_proc.oid
7881Join pg_type.typrelid => pg_class.oid
7982Join pg_type.typelem => pg_type.oid
8083Join pg_type.typinput => pg_proc.oid