On 08/26/2012 10:13 PM, Bruce Momjian wrote:
> On Mon, Jan 2, 2012 at 11:18:47AM -0500, Andrew Dunstan wrote:
>>>> It's worked for things I've wanted, I haven't tried it for psql
>>>> stuff....
>>>>
>>>
>>> Yeah, but it's a bit hacky. I might well not want $HOME reset.
>>> Here's a small patch that does what I think would suit me and
>>> Alvaro.
>>>
>>>
>> Incidentally, this actually doesn't work anyway. psql gets the home
>> path from getpwuid() and ignores $HOME. You could argue that that's
>> a bug, but it's been that way for a long time.
> So, do we want to fix this and honor $HOME?
>
Not really. Mangling it is a nasty hack anyway. Meanwhile see the
subsequent 9.2 feature (described thus in the release notes):
*
Provide environment variable overrides for psql history and startup file locations (Andrew Dunstan)
Specifically, PSQL_HISTORY and PSQLRC determine these file names if set.
cheers
andrew