Re: PSQLRC environment variable. - Mailing list pgsql-patches

From Bruce Momjian
Subject Re: PSQLRC environment variable.
Date
Msg-id 200403141357.i2EDv8Z29427@candle.pha.pa.us
Whole thread Raw
In response to Re: PSQLRC environment variable.  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: PSQLRC environment variable.  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-patches
Tom Lane wrote:
> Bruce Momjian <pgman@candle.pha.pa.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@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

pgsql-patches by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: initdb problen
Next
From: Bruce Momjian
Date:
Subject: Re: ECPG: Update tests & memory leak fix