From: | "Michael Schmidt" <MichaelMSchmidt(at)msn(dot)com> |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | BUG #2931: Can't capture pg_dump Password prompt |
Date: | 2007-01-25 00:20:13 |
Message-ID: | 200701250020.l0P0KD9N009076@wwwmaster.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
The following bug has been logged online:
Bug reference: 2931
Logged by: Michael Schmidt
Email address: MichaelMSchmidt(at)msn(dot)com
PostgreSQL version: 8.2
Operating system: Windows XP Pro
Description: Can't capture pg_dump Password prompt
Details:
I have a Java user app that allows database backup and restore by accessing
pg_dump and pg_restore. With PostgreSQL version 8.1, I was able to capture
the Password: prompt on stderr, which allowed me to send to password at the
proper time. This no longer works with PostgreSQL 8.2. I've worked on this
for three days and even wrote a separate Java app to test various PostgreSQL
utilities, posting results on the General list (got no help there). I
further confirmed the behavior by redirecting stderr from Windows cmd.exe.
Although the password prompt appears on the screen, it does not appear to be
in either stdout or stderr. For Windows command prompt, the following was
used:
pg_dump.exe -Upostgres --host=localhost --port=5432 -W -v
--file=E:\Backup\test.bak npbase 2>>log.txt
As expected from using -v, a nice log of output was present in log.txt but
not the "Password: " prompt. I will supply the Java test app if you like.
If the prompt is, in fact, being output on stderr, it cannot be accessed
from either cmd.exe or Java. If it has been changed, documentation on how
to access it would be useful for app developers.
Incidentally, I also found that when pg_restore is run without any
parameters it hangs. Shouldn't it close neatly with an error message?
Thanks for your time!
From | Date | Subject | |
---|---|---|---|
Next Message | Chris Dunlop | 2007-01-25 07:37:59 | btree_delete_page_redo: lost target page |
Previous Message | Stefan Kaltenbrunner | 2007-01-24 21:04:08 | Re: BUG #2927: Trigger execution hides foreign key error |