pg_dump return status.. - Mailing list pgsql-general

From Anand Raman
Subject pg_dump return status..
Date
Msg-id 20010104154225.F13797@india-today.com
Whole thread Raw
Responses Re: pg_dump return status..  ("Anthony E . Greene" <agreene@pobox.com>)
List pgsql-general
hi guys

I am trying to create a shell script which dumps my db to a flat file ..

To dump the database i use the pg_dump command..

I find that irrespective of the fact whether pg_dump managed to connect
to the db or not the return status ($?) is always zero.. This throws the
shell script in a spin which continues even when pg_dump is not able to
connect ..

Is there anyway around this. I thought of one way was to check stderr
for the occurence of the word "failed" and then exit..

Ur suggestions are most welcome

version postgresql 702

Regards
Anand Raman



pgsql-general by date:

Previous
From: Nelio Alves Pereira Filho
Date:
Subject: Re: Inheritance and Foreign Keys
Next
From: "Craig L. Ching"
Date:
Subject: RE: Test for existence of Table