Skip to content

Commit aa6fdd1

Browse files
committed
Make duplicate_oids return nonzero exit status if duplicates were found
Automatic detection of errors is easier that way.
1 parent eb51af7 commit aa6fdd1

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/include/catalog/duplicate_oids

+5-2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ sed -n -e 's/^DATA(insert *OID *= *\([0-9][0-9]*\).*$/\1/p' \
2222
-e 's/^DECLARE_TOAST([^,]*, *\([0-9][0-9]*\), *\([0-9][0-9]*\).*$/\1,\2/p' | \
2323
tr ',' '\n' | \
2424
sort -n | \
25-
uniq -d
25+
uniq -d | \
26+
grep '.'
2627

27-
exit 0
28+
# nonzero exit code if lines were produced
29+
[ $? -eq 1 ]
30+
exit

0 commit comments

Comments
 (0)