pg_restore - authentication failed?

From: Zlatko Matić <zlatko(dot)matic1(at)sb(dot)t-com(dot)hr>
To: <pgsql-general(at)postgresql(dot)org>
Subject: pg_restore - authentication failed?
Date: 2005-09-08 13:52:43
Message-ID: 019d01c5b47c$963690f0$52bffea9@zlatkovyfkpgz6
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello.
I have a strange problem when trying to use pg_restore to restore data from
a backup, on WIN XP, PostgreSQL 8.0.3.

If I use PgAdmin it works, but if I copy the command to .bat file
authentication fails although I enter correct password.
The .bat script is the following:

cd D:\Program Files\PostgreSQL\8.0\bin
pg_restore.exe -i -h localhost -p 5432 -U postgres -d
"MYDATABASE" -a --disable-triggers -t mytablename -v
"C:\BACKUP\MYDATABASE_DATA_BCP_Fc.fcbackup"

and the error is:
pg_restore: [archiver (db)] connection to database "MYDATABASE" failed:
FATAL: password authentication failed for user "postgres"

I also tried to pass password by pgpass.conf file, but without result. If I
use PgAdmin, it works....

What could be the reason ? Is this a bug ?

Zlatko

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tino Wildenhain 2005-09-08 14:03:50 Re: Bash script to update sequences
Previous Message Bohdan Linda 2005-09-08 13:39:50 Re: Partial commit within the trasaction