Re: help! default database for user - Mailing list pgsql-general

From Medi Montaseri
Subject Re: help! default database for user
Date
Msg-id 3E14C372.7060407@intransa.com
Whole thread Raw
In response to help! default database for user  ("philip johnson" <philip.johnson@atempo.com>)
Responses Re: help! default database for user
List pgsql-general
An extension of .bash_profile would be /etc/profile, a system wide point of
customization with a few line of code that export PGDATABASE based on
userid or
groupid or whatever ....

Martijn van Oosterhout wrote:

>On Thu, Jan 02, 2003 at 07:27:21PM +0100, philip johnson wrote:
>
>
>>is it possible to assign a default database for a user
>>example: database B for user A
>>
>>so when I will use psql it will not say thet database A does not
>>exists
>>
>>
>
>The easiest way I can think of is to set the PGDATABASE environment variable
>in the .bash_profile of the user. then psql will use that instead of the
>username.
>
>HTH,
>
>




pgsql-general by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: pg_restore woes..
Next
From: Lamar Owen
Date:
Subject: Re: pg_restore woes..