BUG #2931: Can't capture pg_dump Password prompt

Поиск
Список
Период
Сортировка
От Michael Schmidt
Тема BUG #2931: Can't capture pg_dump Password prompt
Дата
Msg-id 200701250020.l0P0KD9N009076@wwwmaster.postgresql.org
обсуждение исходный текст
Ответы Re: BUG #2931: Can't capture pg_dump Password prompt  (Magnus Hagander <magnus@hagander.net>)
Список pgsql-bugs
The following bug has been logged online:

Bug reference:      2931
Logged by:          Michael Schmidt
Email address:      MichaelMSchmidt@msn.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!

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #2930: Hash join abyssmal with many null fields.
Следующее
От: Chris Dunlop
Дата:
Сообщение: btree_delete_page_redo: lost target page