mirror of
https://github.com/zebrajr/postgres.git
synced 2025-12-07 00:20:24 +01: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' | \
|
||||
tr ',' '\n' | \
|
||||
sort -n | \
|
||||
uniq -d
|
||||
uniq -d | \
|
||||
grep '.'
|
||||
|
||||
exit 0
|
||||
# nonzero exit code if lines were produced
|
||||
[ $? -eq 1 ]
|
||||
exit
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user