Tom Lane wrote:
> Andrew Dunstan <andrew@dunslane.net> writes:
>
>>I think CSIDL_APPDDATA is probably the way to go, but one of the heavy
>>Windows hitters will know better than I do.
>
>
> 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.
more fun. I just checked the environment of the postmaster service on a
win2000 Pro system (using www.sysinternals.com's excellent Process Explorer
tool, btw). HOME is not set. USERPROFILE is set to "C:\Documents and
Settings\postgres"...
For services that are running as 'NT AUTHORITY\SYSTEM', the profile is
"C:\Documents and Settings\Default User" (and the USERDOMAIN and USERNAME
aren't set at all)...