diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2011-03-28 22:52:23 +0300 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2011-03-28 22:56:52 +0300 |
commit | aa6fdd186cf2c29e04d3cc8ca19783fb904a5a33 (patch) | |
tree | cda427c73a76912e6d1f5d6a8a2e638a6fecaa43 | |
parent | eb51af71f241e8cb199790dee9ad246bb36b3287 (diff) | |
download | postgresql-aa6fdd186cf2c29e04d3cc8ca19783fb904a5a33.tar.gz postgresql-aa6fdd186cf2c29e04d3cc8ca19783fb904a5a33.zip |
Make duplicate_oids return nonzero exit status if duplicates were found
Automatic detection of errors is easier that way.
-rwxr-xr-x | src/include/catalog/duplicate_oids | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/include/catalog/duplicate_oids b/src/include/catalog/duplicate_oids index 3f3d9f69a8b..82c12f3afc2 100755 --- a/src/include/catalog/duplicate_oids +++ b/src/include/catalog/duplicate_oids @@ -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 |