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

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

From: John R Pierce <pierce(at)hogranch(dot)com>
To: Christoph Becker <cgbecker(at)gmx(dot)de>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: psql: no chance to enter password in certain situations
Date: 2005-01-12 23:32:06
Message-ID: 41E5B376.8070203@hogranch.com (view raw or flat)
Thread:
Lists: pgsql-bugspgsql-hackers-win32
Christoph Becker wrote:
> 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"
> 
> However, in the following situation the password can still be entered as 
> expected :
> 
> F:\doka\bak>psql -U postgres template1
> Password:
> Welcome to psql 8.0.0rc5, the PostgreSQL interactive terminal.
> ......

try -f instead of <   like...

	psql -U postgres template1 -f pg_dump_all_2005-01-11.txt

btw, personal 'trick', to avoid having to specify template1, I generally 
`createdb postgres` right after installing and doing the initdb.  this way the 
postgres DBA account has his own personal playpen for testing SQL and stuff.


In response to

pgsql-bugs by date

Next:From: Steve NicolaiDate: 2005-01-13 00:29:45
Subject: BUG #1394: LIKE doesn't seem to use an index
Previous:From: FahadDate: 2005-01-12 23:08:55
Subject: BUG #1393: Adding 'LIMIT 1' to the query halts forever if no data present

pgsql-hackers-win32 by date

Next:From: Tom LaneDate: 2005-01-13 02:46:29
Subject: Re: psql: no chance to enter password in certain situations
Previous:From: Christoph BeckerDate: 2005-01-12 23:02:37
Subject: psql: no chance to enter password in certain situations

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