Thread: How to provide password to pg_dump command ?

How to provide password to pg_dump command ?

From
Emi Lu
Date:
Good morning,

Is there a way that I can pass "pwd" to pg_dump command please?


I tried to pg_dump in java, but do not know how to pass password.

Thanks a lot!




Re: How to provide password to pg_dump command ?

From
"Milen A. Radev"
Date:
Emi Lu написа:
> Good morning,
> 
> Is there a way that I can pass "pwd" to pg_dump command please?
> 
> 
> I tried to pg_dump in java, but do not know how to pass password.


Recommended method -
http://www.postgresql.org/docs/current/static/libpq-pgpass.html

Not recommended method -
http://www.postgresql.org/docs/current/static/libpq-envars.html (look
for PGPASSWORD).



-- 
Milen A. Radev