X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.193]) by svr1.postgresql.org (Postfix) with ESMTP id 602E2310CD4 for ; Tue, 1 Jul 2003 19:14:32 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (svr1.postgresql.org [64.117.224.193]) (amavisd-new, port 10024) with ESMTP id 03423-08 for ; Tue, 1 Jul 2003 16:14:20 -0300 (ADT) Received: from www.postgresql.com (www.postgresql.com [64.117.225.209]) by svr1.postgresql.org (Postfix) with ESMTP id 1C021310D17 for ; Tue, 1 Jul 2003 16:12:51 -0300 (ADT) Received: from ucsns.ucs.co.za (ucs.co.za [196.23.43.2]) by www.postgresql.com (Postfix) with ESMTP id D82C0CF7403 for ; Tue, 1 Jul 2003 11:32:44 -0300 (ADT) Received: from mailgw1.ucs.co.za (mailgw2.ucs.co.za [196.23.43.253]) by ucsns.ucs.co.za (Postfix) with ESMTP id AE8422BD89 for ; Tue, 1 Jul 2003 16:31:47 +0200 (SAST) Received: from ct.ucs.co.za (ct.ucs.co.za [172.31.65.3]) by mailgw1.ucs.co.za (Postfix) with ESMTP id AF1C1D9E42 for ; Tue, 1 Jul 2003 16:31:45 +0200 (SAST) Received: from ct.ucs.co.za (djm.ct.ucs.co.za [172.31.65.91]) by ct.ucs.co.za (8.11.6/8.11.6) with ESMTP id h61EVgt10146 for ; Tue, 1 Jul 2003 16:31:45 +0200 Message-ID: <3F019BA8.1070803@ct.ucs.co.za> Date: Tue, 01 Jul 2003 16:33:12 +0200 From: Derek Main User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.4) Gecko/20011019 Netscape6/6.2 X-Accept-Language: en-us MIME-Version: 1.0 To: pgsql-admin@postgresql.org Subject: zero (o) return code on failure of pg_dump Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Archive-Number: 200307/20 X-Sequence-Number: 9361 I run a pg-dump in one of my scripts and want to send an e-mail on failure (i.e. non-zero return code). This particular dump ran out of disk space and failed. However, the return code is zero! Whether the pg_dump succeeds or fails, zero is always returned. What is the best way to check for the successful completion of the pg_dump? I am running PostgreSQL 7.3 and Redhat Linux 6.2. Thanks. Regards, Derek Main.