Re: postgres 9.3

From: John R Pierce <pierce(at)hogranch(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: postgres 9.3
Date: 2015-09-21 19:02:19
Message-ID: 5600543B.8040204@hogranch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alvaro Herrera 2015-09-21 19:08:48 Re: postgres 9.3
Previous Message Melvin Davidson 2015-09-21 18:52:20 Re: postgres 9.3