mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-09-06 07:59:21 +02:00
21 lines
403 B
Plaintext
21 lines
403 B
Plaintext
|
#!/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.$$
|
||
|
|