Skip site navigation (1) Skip section navigation (2)

Re: psql: no chance to enter password in certain situations

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Christoph Becker <cgbecker(at)gmx(dot)de>
Cc: pgsql-bugs(at)postgresql(dot)org, pgsql-hackers-win32(at)postgresql(dot)org
Subject: Re: psql: no chance to enter password in certain situations
Date: 2005-01-13 02:46:29
Message-ID: 4390.1105584389@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugspgsql-hackers-win32
Christoph Becker <cgbecker(at)gmx(dot)de> writes:
> OS ist Windows XP Prof, PgSQL version is rc5 via windowsinstaller
> When trying to restore a db, psql does not ask for the password but 
> responds imediately with an erromessage as in the following example:

> F:\doka\bak>psql -U postgres template1 < pg_dump_all_2005-01-11.txt
> Password:
> psql: FATAL:  password authentication failed for user "postgres"

I'm not sure that it's possible to fix that.  On Unix we read the
password from /dev/tty not stdin, but on Windows that trick (probably)
does not work, and we have to fall back to reading from stdin ...
which you've stuffed with the input file.  Better to use -f to source
the input file.

			regards, tom lane

In response to

pgsql-bugs by date

Next:From: Magnus HaganderDate: 2005-01-13 09:41:05
Subject: Re: rc4 and rc3, some deleted, but still needed text in the
Previous:From: Steve NicolaiDate: 2005-01-13 00:29:45
Subject: BUG #1394: LIKE doesn't seem to use an index

pgsql-hackers-win32 by date

Next:From: M.N. SwaminathanDate: 2005-01-13 04:46:13
Subject: Re: Bugs]
Previous:From: John R PierceDate: 2005-01-12 23:32:06
Subject: Re: psql: no chance to enter password in certain situations

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group