mirror of
https://github.com/postgres/postgres.git
synced 2026-03-02 05:13:42 -05:00
hand-assigned rowtype OIDs, even when they are not "bootstrapped" catalogs that have handmade type rows in pg_type.h. Give pg_database such an OID. Restore the availability of C macros for the rowtype OIDs of the bootstrapped catalogs. (These macros are now in the individual catalogs' .h files, though, not in pg_type.h.) This commit doesn't do anything especially useful by itself, but it's necessary infrastructure for reverting some ill-considered changes in relcache.c.
27 lines
898 B
Bash
Executable file
27 lines
898 B
Bash
Executable file
#!/bin/sh
|
|
#
|
|
# duplicate_oids
|
|
#
|
|
# $PostgreSQL: pgsql/src/include/catalog/duplicate_oids,v 1.9 2009/09/26 22:42:01 tgl Exp $
|
|
#
|
|
# finds manually-assigned oids that are duplicated in the system tables.
|
|
#
|
|
# run this script in src/include/catalog.
|
|
#
|
|
|
|
# note: we exclude BKI_BOOTSTRAP relations since they are expected to have
|
|
# matching DATA lines in pg_class.h and pg_type.h
|
|
|
|
cat pg_*.h toasting.h indexing.h | \
|
|
egrep -v -e '^CATALOG\(.*BKI_BOOTSTRAP' | \
|
|
sed -n -e 's/^DATA(insert *OID *= *\([0-9][0-9]*\).*$/\1/p' \
|
|
-e 's/^CATALOG([^,]*, *\([0-9][0-9]*\).*BKI_ROWTYPE_OID(\([0-9][0-9]*\)).*$/\1,\2/p' \
|
|
-e 's/^CATALOG([^,]*, *\([0-9][0-9]*\).*$/\1/p' \
|
|
-e 's/^DECLARE_INDEX([^,]*, *\([0-9][0-9]*\).*$/\1/p' \
|
|
-e 's/^DECLARE_UNIQUE_INDEX([^,]*, *\([0-9][0-9]*\).*$/\1/p' \
|
|
-e 's/^DECLARE_TOAST([^,]*, *\([0-9][0-9]*\), *\([0-9][0-9]*\).*$/\1,\2/p' | \
|
|
tr ',' '\n' | \
|
|
sort -n | \
|
|
uniq -d
|
|
|
|
exit 0
|