At 00:53 +0300 on 03/08/1999, Dmitry Morozovsky wrote:


> Yes, surely, I meant precisely this situation. I have looked through
> sources of pg_dump, but have no time to patch it to achieve desired
> effect :)

I have a feeling your question is really "How do I have the password
entered if there is no command-line option for pg_dump that accepts a
password?"

If that's what you meant, then setting the PGUSER environment variable to
the username and PGPASSWORD to the password will do the trick.

So you can write a script

#!/usr/bin/bash
export PGUSER=myuser
export PGPASSWORD=mypassword
pg_dump ....

This is hardcoding, of course, so make the script unreadable.

Herouth

--
Herouth Maoz, Internet developer.
Open University of Israel - Telem project
http://telem.openu.ac.il/~herutma


Reply via email to