duplicate_oids

来自「PostgreSQL7.4.6 for Linux」· 代码 · 共 47 行

TXT
47
字号
#!/bin/sh## duplicate_oids## finds oids that are duplicated in the system tables.#FILES=`ls pg_*.h`## The previous version did not use the -d option on uniq# so check here that it is supported.# Otherwise, use the old algorithm#if [ `uniq -d < /dev/null > /dev/null 2>&1` ]; then  echo "uniq -d is not supported on your platform."  echo "Please report this to pgsql-hackers@postgresql.org"egrep '^DATA' $FILES | \	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$' | \	uniqrm /tmp/alloids.$$rm /tmp/uniqoids.$$else#  echo "uniq -d is supported on this platform."#  echo "Will omit the use of temporary files."egrep '^DATA' $FILES | \	sed -e 's/^.*OID[^=]*=[^0-9]*//' -e 's/[^0-9].*$//' | \	sort -n | uniq -d | \	egrep -v '^[0]*$'fiexit

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?