|
1 | 1 |
|
2 | 2 | findoidjoins
|
3 | 3 |
|
4 |
| -This program scans a database, and prints oid fields and the tables |
5 |
| -they join to. CAUTION: it is ver-r-r-y slow on a large database, or |
6 |
| -even a not-so-large one. We don't really recommend running it on |
7 |
| -anything but an empty database. |
| 4 | +This program scans a database, and prints oid fields (also regproc fields) |
| 5 | +and the tables they join to. CAUTION: it is ver-r-r-y slow on a large |
| 6 | +database, or even a not-so-large one. We don't really recommend running |
| 7 | +it on anything but an empty database. |
8 | 8 |
|
9 | 9 | It requires pgsql/contrib/pginterface to be compiled first.
|
10 | 10 |
|
11 |
| -Run on an empty database, it returns the system join relationships |
12 |
| -(shown below for 6.5). Note that unexpected matches may indicate |
13 |
| -bogus entries in system tables --- don't accept a peculiar match |
14 |
| -without question. In particular, a field shown as joining to more |
15 |
| -than one target table is probably messed up. |
| 11 | +Run on an empty database, it returns the system join relationships (shown |
| 12 | +below for 6.5). Note that unexpected matches may indicate bogus entries |
| 13 | +in system tables --- don't accept a peculiar match without question. |
| 14 | +In particular, a field shown as joining to more than one target table is |
| 15 | +probably messed up. In 6.5, the *only* field that should join to more |
| 16 | +than one target is pg_description.objoid. (Running make_oidjoins_check |
| 17 | +is an easy way to spot fields joining to more than one table, BTW.) |
16 | 18 |
|
17 | 19 | The shell script make_oidjoins_check converts findoidjoins' output
|
18 | 20 | into an SQL script that checks for dangling links (entries in an
|
19 |
| -OID column that don't match any row in the expected table). |
20 |
| -The result of this script should be installed as the "oidjoins" |
| 21 | +OID or REGPROC column that don't match any row in the expected table). |
| 22 | +Note that fields joining to more than one table are NOT processed. |
| 23 | + |
| 24 | +The result of make_oidjoins_check should be installed as the "oidjoins" |
21 | 25 | regression test. The oidjoins test should be updated after any
|
22 | 26 | revision in the patterns of cross-links between system tables.
|
23 | 27 | (Ideally we'd just regenerate the script as part of the regression
|
@@ -68,9 +72,6 @@ Join pg_operator.oprrsortop => pg_operator.oid
|
68 | 72 | Join pg_operator.oprcode => pg_proc.oid
|
69 | 73 | Join pg_operator.oprrest => pg_proc.oid
|
70 | 74 | Join pg_operator.oprjoin => pg_proc.oid
|
71 |
| -Join pg_parg.parproid => pg_operator.oid |
72 |
| -Join pg_parg.parproid => pg_proc.oid |
73 |
| -Join pg_parg.partype => pg_type.oid |
74 | 75 | Join pg_proc.prolang => pg_language.oid
|
75 | 76 | Join pg_proc.prorettype => pg_type.oid
|
76 | 77 | Join pg_rewrite.ev_class => pg_class.oid
|
|
0 commit comments