Re: PSQLRC environment variable.

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: James Tanis <jtt(at)sysd(dot)com>, pgsql-patches(at)postgresql(dot)org
Subject: Re: PSQLRC environment variable.
Date: 2004-03-14 13:57:08
Message-ID: 200403141357.i2EDv8Z29427@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > I just checked a few apps and I see they usually allow a global config
> > file to be specified. How about SYSPSQLRC that adds a system-wide psql
> > config file to be read before the one in the home directory?
>
> The ones I know of that allow such a thing generally hard-wire the
> location of the global config file at build time, rather than taking it
> from an environment variable. The env var approach seems weird, and a
> tad inefficient (since you'd have to put such an env var into the global
> .profile, meaning it propagates into every single process ever launched
> on your system). Also I think we have at least one global config file
> already for libpq, and its location is hard-wired.

Agreed. There is usually one global config file, and SYS* overrides it.
The global one we have now is pg_service.conf. Maybe we should forget
the environment variable idea and just have a pgsql.rc.sample file in
share, with documentation in the file on how to install it. That is
what we do with pg_service.conf now for libpq.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Andrew Dunstan 2004-03-14 13:57:45 listening addresses
Previous Message Michael Meskes 2004-03-14 12:17:01 Re: ECPG - Remove need for "AT connection" when using threads