Fix obsolete comment regarding FSM truncation.
[PostgreSQL.git] / src / include / catalog / duplicate_oids
bloba75c4d8f0971ab505641e7e2501e0204f87fc810
1 #!/bin/sh
3 # duplicate_oids
5 # $PostgreSQL$
7 # finds manually-assigned oids that are duplicated in the system tables.
9 # run this script in src/include/catalog.
12 # note: we exclude BKI_BOOTSTRAP relations since they are expected to have
13 # matching DATA lines in pg_class.h
15 cat pg_*.h toasting.h indexing.h | \
16 egrep -v -e '^CATALOG\(.*BKI_BOOTSTRAP' | \
17 sed -n -e 's/^DATA(insert *OID *= *\([0-9][0-9]*\).*$/\1/p' \
18 -e 's/^CATALOG([^,]*, *\([0-9][0-9]*\).*$/\1/p' \
19 -e 's/^DECLARE_INDEX([^,]*, *\([0-9][0-9]*\).*$/\1/p' \
20 -e 's/^DECLARE_UNIQUE_INDEX([^,]*, *\([0-9][0-9]*\).*$/\1/p' \
21 -e 's/^DECLARE_TOAST([^,]*, *\([0-9][0-9]*\), *\([0-9][0-9]*\).*$/\1,\2/p' | \
22 tr ',' '\n' | \
23 sort -n | \
24 uniq -d
26 exit 0