From: | "Merlin Moncure" <merlin(dot)moncure(at)rcsonline(dot)com> |
---|---|
To: | "Christoph Becker" <cgbecker(at)gmx(dot)de> |
Cc: | <pgsql-hackers-win32(at)postgresql(dot)org> |
Subject: | Re: [BUGS] psql: no chance to enter password in certain situations |
Date: | 2005-01-13 15:40:03 |
Message-ID: | 6EE64EF3AB31D5448D0007DD34EEB3412A75AE@Herge.rcsinc.local |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-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.
Here are some more alternatives:
1. Setup PGPASSWORD in environment variables
2. use set to do a temporary version of above. This is pretty flexible
if you don't want to use -f for some reason
3. temporarily edit pg_hba.conf to trust your terminal while restoring
4. set up the psql password file (haven't tried this on win32 yet)
Merlin
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2005-01-13 15:56:12 | Win32 config file extension, capitalization |
Previous Message | Kevin Brown | 2005-01-13 13:03:54 | Re: [pgsql-hackers-win32] [BUGS] More SSL questions.. |