Re: [HACKERS] Patch to psql.c to allow .psqlrc file - Mailing list pgsql-hackers

From The Hermit Hacker
Subject Re: [HACKERS] Patch to psql.c to allow .psqlrc file
Date
Msg-id 897e0f5d749503d6ef4b77bbc0d57020
Whole thread Raw
In response to [HACKERS] Patch to psql.c to allow .psqlrc file  (Andrew Martin <martin@biochemistry.ucl.ac.uk>)
List pgsql-hackers
On Sat, 21 Jun 1997 bennett@research.oneworld.com wrote:

>
> > > Can I request we search in the postgres install directory first, then
> > > the home directory, or is that stupid because there may not be a
> > > postgresql install directory on the machine you are running psql on.
>
> > It's trivial to search whatever directories we want to, but using
> > /etc/ and $HOME is the convention which every other program I know
> > of follows, so I just did the same.
> >
> > It's certainly true that every machine will have a /etc whereas
> > maybe only one machine on a network may have the PG
> > installation directory.
> >
> > I'd vote for leaving it as is...
> >
> >
> > Andrew
>
> How about some sort of PATH variable?
> setenv PG_INITPATH    /etc:/usr/local/pgsql:~
> or
> export PG_INITPATH=/etc:/usr/local/pgsql:/home/bennett

Hrmm...was just thinking about this, and there is a flaw here:

PostgreSQL isn't installed as root.  What about an admin that sets up a
pgsql account, gives it to someone else to installed/maintain...no global
psqlrc file :(

I don't know if there is any way of doing it, but I would tend to think that
having on 'central to the install directory' in this case might actually
be advisable.  Maybe use the --pgdata variable to setup the initial file,
similar to pg_hba.conf?


Marc G. Fournier
Systems Administrator @ hub.org
primary: scrappy@hub.org           secondary: scrappy@{freebsd|postgresql}.org

------------------------------

pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: [HACKERS] [BUGS] DateStyle (fwd)
Next
From: The Hermit Hacker
Date:
Subject: Re: [HACKERS] \dt and disk access