Re: Explicit psqlrc - Mailing list pgsql-hackers

From Magnus Hagander
Subject Re: Explicit psqlrc
Date
Msg-id 9837222c1003050139p671e8b44i11adefb09a51c442@mail.gmail.com
Whole thread Raw
In response to Re: Explicit psqlrc  (David Christensen <david@endpoint.com>)
Responses Re: Explicit psqlrc
Re: Explicit psqlrc
List pgsql-hackers
2010/3/5 David Christensen <david@endpoint.com>:
>
> On Mar 4, 2010, at 4:00 PM, Magnus Hagander wrote:
>
>> I've now for the second time found myself wanting to specify an
>> explicit psqlrc file instead of just parsing ~/.psqlrc, so attached is
>> a patch that accepts the PSQLRC environment variable to control which
>> psqlrc file is used.
>>
>> Any objections to this (obviously including documentation - this is
>> just the trivial code)
>
>
> My bikeshed has a --psqlrc path/to/file, but +1 on the idea.

The main reason I went with environment variable is that it's the
path-of-least-code :-) And it easily fullfills my use-cases for it,
which has me launching interactive psql with completely different
settings from a script.

Do you have a use-case where --psqlrc would be more useful than an
environment variable, or is it *only* bike-shedding? ;)

-- Magnus HaganderMe: http://www.hagander.net/Work: http://www.redpill-linpro.com/


pgsql-hackers by date:

Previous
From: Dave Page
Date:
Subject: Re: Visual Studio 2005, C-language function - avoiding hacks?
Next
From: Jesper Krogh
Date:
Subject: Using GIN/Gist to search the "union" of two indexes?