Thread: Search path in group_roles not honered for logins

Search path in group_roles not honered for logins

From
Ow Mun Heng
Date:
CREATE ROLE db_users
  NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE;
ALTER ROLE db_users SET search_path=mydb, public;

When I create a login,

CREATE ROLE oli LOGIN
  ENCRYPTED PASSWORD 'mXXX'
  NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE;
ALTER ROLE oliver SET search_path=xmms; <---- I have to set this manually
GRANT db_users TO ol;

Why is this such or is this an intended feature?

Re: Search path in group_roles not honered for logins

From
Tom Lane
Date:
Ow Mun Heng <Ow.Mun.Heng@wdc.com> writes:
> Why is this such or is this an intended feature?

No, there is no intention that ALTER ROLE SET values be inherited ---
what you get is just what is attached to the role you logged in as.
What would you do with conflicting sets from different inherited roles,
to name just one problem?

            regards, tom lane

Re: Search path in group_roles not honered for logins

From
Ow Mun Heng
Date:
On Thu, 2007-11-01 at 00:02 -0400, Tom Lane wrote:
> Ow Mun Heng <Ow.Mun.Heng@wdc.com> writes:
> > Why is this such or is this an intended feature?
>
> No, there is no intention that ALTER ROLE SET values be inherited ---
> what you get is just what is attached to the role you logged in as.
> What would you do with conflicting sets from different inherited roles,
> to name just one problem?

So. it's a intended feature, and I didn't think of the differences you
mentioned.

I would have thought that, just like a normal *nix ACL, the
roles/permissions would get inherited based on the group's role.

So, I'll have to manually create the set the roles for the individual
users. Perhaps I shouldn't have changed from using the  public schema.

K. thanks for the answer.