Commit aa6fdd18 authored by Peter Eisentraut's avatar Peter Eisentraut

Make duplicate_oids return nonzero exit status if duplicates were found

Automatic detection of errors is easier that way.
parent eb51af71
...@@ -22,6 +22,9 @@ sed -n -e 's/^DATA(insert *OID *= *\([0-9][0-9]*\).*$/\1/p' \ ...@@ -22,6 +22,9 @@ sed -n -e 's/^DATA(insert *OID *= *\([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' | \
tr ',' '\n' | \ tr ',' '\n' | \
sort -n | \ sort -n | \
uniq -d uniq -d | \
grep '.'
exit 0 # nonzero exit code if lines were produced
[ $? -eq 1 ]
exit
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment