> >
> > OK, here's a quick patch to psql.c which first reads commands from
> > /etc/psqlrc and then from $HOME/.psqlrc
> >
> > I've used access() to check on the existence of these files; I'm
> > not sure if every system has access(), so it might be necessary
> > to change to stat() instead. Certainly Linux and Irix *do* have
> > access()
>
> 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.
>
> Just asking.
>
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
- ----------------------------------------------------------------------------
Dr. Andrew C.R. Martin University College London
EMAIL: (Work) martin@biochem.ucl.ac.uk (Home) andrew@stagleys.demon.co.uk
URL: http://www.biochem.ucl.ac.uk/~martin
Tel: (Work) +44(0)171 419 3890 (Home) +44(0)1372 275775
------------------------------