修正unused_oids脚本结果
修正unused_oids脚本结果
This commit is contained in:
@ -16,6 +16,7 @@
|
||||
# run this script in src/include/catalog.
|
||||
#
|
||||
|
||||
cd `dirname $0`
|
||||
|
||||
AWK="awk"
|
||||
|
||||
@ -27,14 +28,16 @@ export FIRSTOBJECTID
|
||||
# note: we exclude BKI_BOOTSTRAP relations since they are expected to have
|
||||
# matching DATA lines in pg_class.h and pg_type.h
|
||||
|
||||
cat pgxc_*.h pg_*.h toasting.h indexing.h | \
|
||||
cat pgxc_*.h pg_*.h toasting.h indexing.h ../../common/backend/catalog/builtin_funcs.ini | \
|
||||
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' | \
|
||||
-e 's/^DECLARE_TOAST([^,]*, *\([0-9][0-9]*\), *\([0-9][0-9]*\).*$/\1,\2/p' \
|
||||
-e 's/^#define *[^ ]*OID *\([1-9][0-9]*\)$/\1/p' \
|
||||
-e 's/^ *AddBuiltinFunc(_0( *\([1-9][0-9]*\).*$/\1/p' | \
|
||||
tr ',' '\n' | \
|
||||
sort -n | \
|
||||
uniq | \
|
||||
|
Reference in New Issue
Block a user