From a89f9731e9e9e95652183992855d94aa9bf6f28c Mon Sep 17 00:00:00 2001 From: Bruce Momjian <bruce@momjian.us> Date: Sat, 12 Jul 1997 15:57:31 +0000 Subject: [PATCH] Have pg_dumpall return proper status on exit --- src/bin/pg_dump/pg_dumpall | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/bin/pg_dump/pg_dumpall b/src/bin/pg_dump/pg_dumpall index 87c703ac01a..976a05eebe1 100644 --- a/src/bin/pg_dump/pg_dumpall +++ b/src/bin/pg_dump/pg_dumpall @@ -52,5 +52,9 @@ do echo "${BS}connect template1 $POSTGRES_USER" echo "create database $DATABASE;" echo "${BS}connect $DATABASE $POSTGRES_USER" - pg_dump "$@" $DATABASE || echo "pg_dump failed on $DATABASE" 1>&2 + pg_dump "$@" $DATABASE + if [ "$?" -ne 0 ] + then echo "pg_dump failed on $DATABASE, exiting" 1>&2 + exit 1 + fi done -- GitLab