pg_dump return status..

From: Anand Raman <araman(at)india-today(dot)com>
To: postgresql <pgsql-general(at)postgresql(dot)org>
Subject: pg_dump return status..
Date: 2001-01-04 10:12:25
Message-ID: 20010104154225.F13797@india-today.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jose Soares 2001-01-04 10:58:42 Re: Table msysconf
Previous Message François LODIER 2001-01-04 10:07:35 Re: PQexec problem