Re: postgres 9.3 - Mailing list pgsql-general

From John R Pierce
Subject Re: postgres 9.3
Date
Msg-id 5600543B.8040204@hogranch.com
Whole thread Raw
In response to Re: postgres 9.3  (Melvin Davidson <melvin6925@gmail.com>)
Responses Re: postgres 9.3
List pgsql-general
On 9/21/2015 11:52 AM, Melvin Davidson wrote:
> You cannot directly "connect" one schema with another,
> but you can set the default to have both in the search_path.
> Uncomment the #search_path parameter in Postgresql.conf
> and change it to
> search_path = 'preview, role,public,"$user",public'

the above would change it globally for all databases and users on the
system, which is, IMHO, probably not what you want to do.

better would be to...

     ALTER ROLE username SET SEARCH_PATH='preview,"$user", public';
or
     ALTER DATABASE dbname SET...;

and then this change just applies to that named role or database...

to the OP,  a simple SET xxxx   only applies to the current session, its
not remembered.   ALTER ROLE (or ALTER DATABASE) will remember the
setting for the specified user or database.

but if as you said, its the "preview" role that you want to access the
"preview" schema, then the default search path would suffice, as $USER
== preview.



--
john r pierce, recycling bits in santa cruz



pgsql-general by date:

Previous
From: Melvin Davidson
Date:
Subject: Re: postgres 9.3
Next
From: Alvaro Herrera
Date:
Subject: Re: postgres 9.3