On Wed, 2002-12-11 at 11:21, Zengfa Gao wrote:
> I am trying to write some code to do automatic backup
> for PgSQL with pg_dump tool. For safty reason, I still
> want the password protection.
> But pg_dump force password prompt. I don't find a way
> to give pg_dump with code. Does anyone have an idea?
Set the PGPASSWORD env var, or use the ~/.pgpass file (in 7.3). For more
info, see:
http://www.ca.postgresql.org/users-lounge/docs/7.3/postgres/libpq-envars.html
http://www.ca.postgresql.org/users-lounge/docs/7.3/postgres/libpq-files.html
Cheers,
Neil