mirror of
https://github.com/postgres/postgres.git
synced 2025-05-06 19:59:18 +03:00
Make duplicate_oids return nonzero exit status if duplicates were found
Automatic detection of errors is easier that way.
This commit is contained in:
parent
eb51af71f2
commit
aa6fdd186c
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user