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

Поиск
Список
Период
Сортировка
От John R Pierce
Тема Re: psql: no chance to enter password in certain situations
Дата
Msg-id 41E5B376.8070203@hogranch.com
обсуждение исходный текст
Ответ на psql: no chance to enter password in certain situations  (Christoph Becker <cgbecker@gmx.de>)
Список pgsql-bugs
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.

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Christoph Becker
Дата:
Сообщение: Re: rc4 and rc3, some deleted, but still needed text in the
Следующее
От: Tom Lane
Дата:
Сообщение: Re: psql: no chance to enter password in certain situations