On Tue, 3 Aug 1999, Herouth Maoz wrote:

HM> > Yes, surely, I meant precisely this situation. I have looked through
HM> > sources of pg_dump, but have no time to patch it to achieve desired
HM> > effect :)
HM> 
HM> I have a feeling your question is really "How do I have the password
HM> entered if there is no command-line option for pg_dump that accepts a
HM> password?"
HM> 
HM> If that's what you meant, then setting the PGUSER environment variable to
HM> the username and PGPASSWORD to the password will do the trick.
HM> 
HM> So you can write a script
HM> 
HM> #!/usr/bin/bash
HM> export PGUSER=myuser
HM> export PGPASSWORD=mypassword
HM> pg_dump ....
HM> 
HM> This is hardcoding, of course, so make the script unreadable.

This is not very useful solution, as the script shoud be readable at least
for owner -- but we can make simple C program, compile it and make
executable only (0100).

Sincerely,
D.Marck                                   [DM5020, DM268-RIPE, DM3-RIPN]
------------------------------------------------------------------------
*** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- [EMAIL PROTECTED] ***
------------------------------------------------------------------------

Reply via email to