Re: [pgsql-hackers-win32] [BUGS] More SSL questions..

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [pgsql-hackers-win32] [BUGS] More SSL questions..
Дата
Msg-id 27860.1104937938@sss.pgh.pa.us
обсуждение исходный текст
Список pgsql-hackers
"Magnus Hagander" <mha@sollentuna.net> writes:
> Tom also wrote:
>> Now that I look at it, there are several places that are depending on
>> getenv("HOME") or getenv("USERPROFILE") (on Windows) as the meaning of
>> "home directory".  In particular ~/.pgpass is sought there, and psql
>> also uses get_home_path in a lot of places.

>> Seems like we should be consistent about this --- either we trust
>> $HOME or we don't.

> Don't trust $HOME on win32. There is no such thing.It's set by Cygwin,
> and it's set by the MingW shell, but it's not set by Windows. HOMEDRIVE,
> HOMEPATH and HOMESHARE are set, but not HOME.

> You can trust USERPROFILE in NT based OSes. Not sure about 9x. Using the
> API above is a much nicer way of doing it.

We are using $USERPROFILE, not $HOME, on Windows, but I think Magnus is
right: we shouldn't be doing that at all.  If I don't hear any
objections soon, I'm going to replace get_home_path() with code that
uses getpwuid (on Unix) or SHGetSpecialFolderPath (on Windows).

            regards, tom lane

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

Предыдущее
От: Jaime Casanova
Дата:
Сообщение: Re: rule system oddity
Следующее
От: Robert Treat
Дата:
Сообщение: Re: Where are the docs