aboutsummaryrefslogtreecommitdiff
path: root/src/include/catalog/duplicate_oids
blob: caf43a80106dbd6d02ba058914a54496b09007ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh
#
# duplicate_oids
#
# finds oids that are duplicated in the system tables.
#

egrep '^DATA' pg_*.h | \
	sed -e 's/^.*OID[^=]*=[^0-9]*//' -e 's/[^0-9].*$//' | \
	sort -n >/tmp/alloids.$$
uniq /tmp/alloids.$$ >/tmp/uniqoids.$$
diff -u /tmp/alloids.$$ /tmp/uniqoids.$$ | \
	grep -v '/tmp/' | \
	grep '^-' | \
	sed -e 's/^-//' | \
	grep -v '^0$' | \
	uniq
rm /tmp/alloids.$$
rm /tmp/uniqoids.$$