postgresql/src/include/catalog/duplicate_oids
Thomas G. Lockhart 6f58115ddd Measure the current transaction time to milliseconds.
Define a new function, GetCurrentTransactionStartTimeUsec() to get the time
 to this precision.
Allow now() and timestamp 'now' to use this higher precision result so
 we now have fractional seconds in this "constant".
Add timestamp without time zone type.
Move previous timestamp type to timestamp with time zone.
Accept another ISO variant for date/time values: yyyy-mm-ddThh:mm:ss
 (note the "T" separating the day from hours information).
Remove 'current' from date/time types; convert to 'now' in input.
Separate time and timetz regression tests.
Separate timestamp and timestamptz regression test.
2001-09-28 08:09:14 +00:00

47 lines
1,000 B
Bash
Executable file

#!/bin/sh
#
# duplicate_oids
#
# finds oids that are duplicated in the system tables.
#
# no multibytes files
FILES=`ls pg_*.h |grep -v '_mb.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$' | \
uniq
rm /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]*$'
fi
exit