Re: psql + autocommit

From: John Sidney-Woollett <johnsw(at)wardbrook(dot)com>
To:
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: psql + autocommit
Date: 2004-09-17 14:47:47
Message-ID: 414AF913.6020709@wardbrook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Why not create this file during the "make install", and explicitly set
the current/standard default options (for psql) in the
$PREFIX/share/psqlrc file?

If the file is deleted or not found then the current/standard default
options would still apply - but atleast the default are there for all to
see in the config file.

Presumably any user wanting to use their own settings with a ~/.psqlrc
file would have these setting override the settings in the global file.

John Sidney-Woollett

Bruce Momjian wrote:

> Lars Haugseth wrote:
>
>>* Michael Paesold:
>>| Peter Eisentraut wrote:
>>| > Lars Haugseth wrote:
>>| > > Version 8.0.0beta2 supports a global configuration file. It's should
>>| > > be located in '~postgres/etc/pgsql'.
>>| >
>>| > That would be pretty useless, since normal users often don't have read
>>| > access to another user's home directory.
>>|
>>| Further up in this thread I read $PGDATA/etc/psqlrc, which seems like
>>| nonsense, too. First, $PGDATA is not known at compile time, second no user
>>| should have access to that directory.
>>|
>>| Perhaps it should be (and really is) $PREFIX/etc/psqlrc?
>>| (where $PREFIX is of course the installation prefix set during configure)
>>|
>>| I am not at work, so I can have a look at the code or test it myself right
>>| now.
>>
>>There's a file $PREFIX/share/psqlrc.sample that reads:
>>
>>--
>>-- psql configuration file
>>--
>>-- This file is read before the .psqlrc file in the user's home directory.
>>--
>>-- Copy this to your sysconf directory (typically /usr/local/pgsql/etc) and
>>-- rename it psqlrc.
>>
>>So $PREFIX/etc/psqlrc is the right place. (In my setup, ~postgres equals
>>$PREFIX).
>>
>>This directory is not created by "gmake install", though. Perhaps it should
>>be?
>
>
> The directory is not created because we don't know if they will be using
> this feature.
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2004-09-17 14:56:36 Re: Converting varchar() to text
Previous Message Bruce Momjian 2004-09-17 14:31:55 Re: psql + autocommit