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

Lines changed: 5 additions & 2 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy