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


Reply via email to