PDA

View Full Version : PostgreSQL using .pgpass


odyn_owl
June 21st, 2006, 09:22 AM
I want to make scripts that backup database, but pg_dump when execute asking for password.
I' wrotten here (http://www.postgresql.org/docs/8.1/interactive/libpq-pgpass.html) about password file, but this file didn't help me - script interept with error authentication failed for user "postgres".
May be somebody do that and can describe step by step what have to do.
thanks.

Server 6.06

wasare
September 3rd, 2006, 11:47 PM
export the environment variables PGUSER and PGPASSWORD

tarvid
May 8th, 2007, 01:33 AM
Not wonderful but set

host all all 127.0.0.1/32 trust

as the first line and restart postgresql.

Might want to put it back afterwards.