Re: Schemas, Roles & Search Path

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Don Parris <parrisdc(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Schemas, Roles & Search Path
Date: 2016-01-09 15:22:58
Message-ID: 5419.1452352978@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Don Parris <parrisdc(at)gmail(dot)com> writes:
> I *think* I want to set the search path on the group roles so that the
> Facilities team can see the COMMON and FACILITIES schemas:
> ALTER ROLE fm_users search_path=common, facilities, accounting;
>
> Or do I need to set the search path for each user individually?
> ALTER ROLE joe SET search_path=common, facilities, accounting;

The latter. A session only absorbs ALTER ROLE SET settings for the
exact role you're logging in as. (Otherwise there would be a need
for a conflict resolution rule, and it's pretty hard to see how that
would work in general for arbitrary settings.) Role "inheritance"
applies to granted privileges only.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2016-01-09 15:52:37 Re: No postgresql-9.5-prefix ?
Previous Message Tim Smith 2016-01-09 14:31:45 Re: No postgresql-9.5-prefix ?