Re: Per Database Roles - Mailing list pgsql-general

From John DeSoi
Subject Re: Per Database Roles
Date
Msg-id 00790BB6-395A-4E18-B7DE-F2DB6A39AB17@pgedit.com
Whole thread Raw
In response to Per Database Roles  ("David Legault" <legault.david@gmail.com>)
List pgsql-general
On Feb 19, 2007, at 10:32 AM, David Legault wrote:

> Is there a way to attach roles to only certain databases so that
> the login [from PHP pg_connect(username, password, database)] is
> tied to that particular database and any creation of roles (users/
> groups) can be constrained into that particular database.
>
> I plan to use the roles system to be able to create the users/
> groups access/permissions and I would like to have them isolated on
> a per database basis instead of having them in a situation that
> Role A (user) belonging to DB C could also be used in DB D
> (security issue).


You can GRANT and REVOKE on database connect privileges. See

http://www.postgresql.org/docs/8.2/interactive/sql-grant.html


John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL


pgsql-general by date:

Previous
From: Karsten Hilbert
Date:
Subject: Re: Why *exactly* is date_trunc() not immutable ?
Next
From: "David Primero Segundo"
Date:
Subject: Re: [pgsql-es-ayuda] postgreSQL