From: | Carlos Mennens <carlos(dot)mennens(at)gmail(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Role Membership |
Date: | 2010-12-20 19:46:29 |
Message-ID: | AANLkTi==GN3EzeRopD4QrJyrooZiRXdk5jUgc=Ra+MQW@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Mon, Dec 20, 2010 at 1:32 PM, Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com> wrote:
> No user, no group, they're al roles. Roles are both / either.
Ah now I understand. Thank you!
> You grant them that:
>
> grant rolename to username;
>
> Then you only ever have to grant / revoke a role to change
> permissions, no need to do a million grants all over the place on each
> table. Just grant it once to the role, grant the role to the user,
> viola, you're done.
OK I now understand:
postgres=# \l
List of databases
Name | Owner | Encoding | Collation | Ctype |
Access privileges
-----------+-----------+----------+-------------+-------------+-----------------------
caldega | cmennens | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
tiburon | cmennens | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
ide | cmennens | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
orlando | jmadeline | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
postgres | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
software | mwilshaw | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
template0 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
=c/postgres +
| | | | |
postgres=CTc/postgres
template1 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
=c/postgres +
| | | | |
postgres=CTc/postgres
(8 rows)
postgres=# ALTER DATABASE ide OWNER TO it;
ALTER DATABASE
postgres=# \l
List of databases
Name | Owner | Encoding | Collation | Ctype |
Access privileges
-----------+-----------+----------+-------------+-------------+-----------------------
caldega | cmennens | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
tiburon | cmennens | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
ide | it | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
orlando | jmadeline | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
postgres | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
software | mwilshaw | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
template0 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
=c/postgres +
| | | | |
postgres=CTc/postgres
template1 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
=c/postgres +
| | | | |
postgres=CTc/postgres
Thanks for helping me out!
-Carlos
From | Date | Subject | |
---|---|---|---|
Next Message | Adrian Klaver | 2010-12-20 20:20:23 | Re: Role Membership |
Previous Message | Kenneth Buckler | 2010-12-20 19:12:24 | PostgreSQL Trusted Startup |