Possible tiny issue with pg_dump.exe on windows

Поиск
Список
Период
Сортировка
От Tony Caduto
Тема Possible tiny issue with pg_dump.exe on windows
Дата
Msg-id 47B1C986.3040606@amsoftwaredesign.com
обсуждение исходный текст
Список pgsql-general
This may apply to Unix versions as well but I have not tried.

Anyway, I am using C# to create a GUI front end to pg_dump and I am
using the PGPASSWORD environment variable to set the password like this:
 System.Environment.SetEnvironmentVariable("PGPASSWORD", myargs.password);

This works fine and pg_dump.exe executes happily. But now here is the issue:

When I pass a database name that does not exist after setting the
password via the environment variable instead of writing the database
not found error to standard error, it prompts for the password and
causes the C# program to lock.  Now the chance of it getting a bad
database name is slim, but it could happen if a database is deleted and
the list is not refreshed.  I am not forcing it to display the password
prompt with -W by the way.

Shouldn't it write the database not found error to standard error
instead of prompting for the password?

If I purposely pass other bad arguments after setting the password it
does not display the password prompt in the command window.  I noticed
this because during development I am showing the process window and for
production it of course will be hidden.

I notices this on the 8.3 version of pg_dump, but probably applies to
others as well.

Has anyone else noticed this?



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

Предыдущее
От: Andrew Sullivan
Дата:
Сообщение: Re: end of life for pg versions...
Следующее
От: g weaver
Дата:
Сообщение: Re: .Net Development Issues