Re: alternate psql file locations

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Aidan Van Dyk <aidan(at)highrise(dot)ca>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: alternate psql file locations
Date: 2012-08-27 02:21:05
Message-ID: 503AD991.6030300@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2012-08-27 03:12:15 Re: Why does analyze_new_cluster.sh use sleep?
Previous Message Bruce Momjian 2012-08-27 02:13:18 Re: alternate psql file locations