Skip to content

Commit 763a7ab

Browse files
committed
Delete unused system table pg_parg.
1 parent 7cb2fd6 commit 763a7ab

File tree

5 files changed

+17
-145
lines changed

5 files changed

+17
-145
lines changed

contrib/findoidjoins/README

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,27 @@
11

22
findoidjoins
33

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.
88

99
It requires pgsql/contrib/pginterface to be compiled first.
1010

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.)
1618

1719
The shell script make_oidjoins_check converts findoidjoins' output
1820
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"
2125
regression test. The oidjoins test should be updated after any
2226
revision in the patterns of cross-links between system tables.
2327
(Ideally we'd just regenerate the script as part of the regression
@@ -68,9 +72,6 @@ Join pg_operator.oprrsortop => pg_operator.oid
6872
Join pg_operator.oprcode => pg_proc.oid
6973
Join pg_operator.oprrest => pg_proc.oid
7074
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
7475
Join pg_proc.prolang => pg_language.oid
7576
Join pg_proc.prorettype => pg_type.oid
7677
Join pg_rewrite.ev_class => pg_class.oid

src/backend/catalog/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# Makefile for catalog
55
#
66
# IDENTIFICATION
7-
# $Header: /cvsroot/pgsql/src/backend/catalog/Makefile,v 1.16 1999/01/18 06:32:24 momjian Exp $
7+
# $Header: /cvsroot/pgsql/src/backend/catalog/Makefile,v 1.17 1999/03/27 17:25:09 tgl Exp $
88
#
99
#-------------------------------------------------------------------------
1010

@@ -33,7 +33,7 @@ LOCALBKI_SRCS= $(addprefix ../../include/catalog/, \
3333
pg_proc.h pg_type.h pg_attribute.h pg_class.h \
3434
pg_inherits.h pg_index.h pg_statistic.h \
3535
pg_operator.h pg_opclass.h pg_am.h pg_amop.h pg_amproc.h \
36-
pg_language.h pg_parg.h \
36+
pg_language.h \
3737
pg_aggregate.h pg_ipl.h pg_inheritproc.h \
3838
pg_rewrite.h pg_listener.h pg_description.h indexing.h \
3939
)

src/include/catalog/pg_parg.h

Lines changed: 0 additions & 117 deletions
This file was deleted.

src/test/regress/expected/oidjoins.out

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -326,14 +326,6 @@ oid|oprjoin
326326
---+-------
327327
(0 rows)
328328

329-
QUERY: SELECT oid, pg_parg.partype
330-
FROM pg_parg
331-
WHERE pg_parg.partype != 0 AND
332-
NOT EXISTS(SELECT * FROM pg_type AS t1 WHERE t1.oid = pg_parg.partype);
333-
oid|partype
334-
---+-------
335-
(0 rows)
336-
337329
QUERY: SELECT oid, pg_proc.prolang
338330
FROM pg_proc
339331
WHERE pg_proc.prolang != 0 AND

src/test/regress/sql/oidjoins.sql

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -165,10 +165,6 @@ SELECT oid, pg_operator.oprjoin
165165
FROM pg_operator
166166
WHERE pg_operator.oprjoin != 0 AND
167167
NOT EXISTS(SELECT * FROM pg_proc AS t1 WHERE t1.oid = pg_operator.oprjoin);
168-
SELECT oid, pg_parg.partype
169-
FROM pg_parg
170-
WHERE pg_parg.partype != 0 AND
171-
NOT EXISTS(SELECT * FROM pg_type AS t1 WHERE t1.oid = pg_parg.partype);
172168
SELECT oid, pg_proc.prolang
173169
FROM pg_proc
174170
WHERE pg_proc.prolang != 0 AND

0 commit comments

Comments
 (0)