On Mon, Dec 20, 2010 at 1:32 PM, Scott Marlowe <scott.marl...@gmail.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

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to