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-10 16:12:26
Message-ID: 200403101612.i2AGCQl10721@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:
> > Tom Lane wrote:
> >> Uh, why is that a good idea?
>
> > Well, suppose you want all your users to use the same psqlrc file.
> > Instead of creating symlinks for every user, you can just set PSQLRC in
> > /etc/profile and everyone gets it.
>
> ... but people who want to make their own .psqlrc can't? At least not
> till it occurs to them to unset PSQLRC? I don't really see the use-case
> here. James' stated problem of setting a default search_path could be

If they want their own, the just unset PSQLRC in their .profile.

> handled at least as effectively through either PGOPTIONS or server-side
> GUC settings (postgresql.conf, or per-user or per-database variable
> settings).
>
> I'm not averse to inventing PSQLRC if there's actually some case it
> solves better than any of our existing mechanisms. But so far it seems
> like a solution desperately in search of a problem.

I think most/all applications that look for a file in the user directory
have either a global place they look too, or a way to control where to
look for it. This seems pretty Unix standard, I think we should follow
that.

--
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-10 16:14:14 Re: [PATCHES] log_line_info
Previous Message Tom Lane 2004-03-10 16:00:39 Re: [PATCHES] log_line_info