Re: .bashrc for postgres user

From: Charles Curley <ccurley(at)trib(dot)com>
To: Steve Petersen <spetey(at)umich(dot)edu>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: .bashrc for postgres user
Date: 2000-09-05 14:51:51
Message-ID: 20000905085151.N2306@trib.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Tue, Sep 05, 2000 at 10:12:14AM -0400, Steve Petersen wrote:
>
> Hey folks,
>
> Is there something I don't get about having an unusual home directory
> like /var/lib/pgsql for the postgres user (in the RPM installation of
> pgsql)? I like to start postmaster manually, but I don't like to type
> the data directory each time. So I tried exporting EDITOR and PGDATA
> env variables in postgres's .bashrc (in /var/lib/pgsql), but it doesn't
> work. If I type '. .bashrc' before typing 'postmaster', though, it
> works fine. What gives?
>
> Thanks!
> Steve

On login, bash runs your .bash_profile, which should then call
.bashrc. .bash_profile is called only on login, but .bashrc is called each
time a term is launched. So put those into .bash_profile. Other terms will
inherit them.

To make sure .bash_profile is called when you su to postgres, do it with a
- in the command line:

su - postgres

This forces bash to execute .bash_profile and do some other things as
though you had just logged in.

The gory details are at: "man bash".

--

-- C^2

No windows were crashed in the making of this email.

Looking for fine software and/or web pages?
http://w3.trib.com/~ccurley

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message ghaverla 2000-09-05 15:05:33 Re: .bashrc for postgres user
Previous Message Leandro Fanzone 2000-09-05 14:41:23 C++ library probs