Re: Problem with roles and permissions

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Chandra Barnett <chandra(dot)barnett(at)cognition(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Problem with roles and permissions
Date: 2008-07-01 21:07:54
Message-ID: 20080701210754.GN18252@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Chandra Barnett wrote:

> What I've done so far is to set up a "group role" and explicitly
> granted it every possible type of permission on the database in
> question, and also on the individual relations in that database. Then
> I created a "login role" and made it part of the group role I created.
> I expected that to let me connect to the dbms using that login role
> and database, and that I'd then be able to select/insert/update/delete
> in the relations in that database. I can connect just fine to that
> database with that login role, as I expected, but I then can't execute
> any commands.

Probably your group role needs to have the INHERIT property set.
Alternatively, you could "SET ROLE group" after connecting.

> It seems there must be some other step that I didn't know to do. In
> MySQL, for example, after changing permissions, one needs to "flush
> privileges" to get everything to take effect. Is there something
> analogous to this in PostgreSQL?

Fortunately not.

--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2008-07-01 21:17:23 Re: Problem with roles and permissions
Previous Message Chandra Barnett 2008-07-01 20:46:04 Problem with roles and permissions