Re: [HACKERS] Patch to psql.c to allow .psqlrc file
| От | Andrew Martin |
|---|---|
| Тема | Re: [HACKERS] Patch to psql.c to allow .psqlrc file |
| Дата | |
| Msg-id | acafd827bd99ab7437f71f1d11073714 обсуждение исходный текст |
| Ответ на | [HACKERS] Patch to psql.c to allow .psqlrc file (Andrew Martin <martin@biochemistry.ucl.ac.uk>) |
| Список | pgsql-hackers |
> > > > 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 ------------------------------
В списке pgsql-hackers по дате отправления: