Обсуждение: Understanding Roles & Grant Options

Поиск
Список
Период
Сортировка

Understanding Roles & Grant Options

От
Carlos Mennens
Дата:
I've been reading the documentation and I'm trying to understand what
'GRANT' options make up a 'superuser' in PostgreSQL.

I've got my account which is 'carlos' and then I have an account
called 'jason'. Can someone please explain the difference between the
two roles:

postgres=# \dg
            List of roles
 Role name |  Attributes  | Member of
-----------+--------------+-----------
 carlos  | Superuser    | {it}
 it        | Cannot login | {}
 jason | Create role  | {it}
           : Create DB
 postgres  | Superuser    | {}
           : Create role
           : Create DB

Obviously 'Carlos' is a superuser but what does that exactly entail
beyond CREATEDB & CREATEROLE?

http://www.postgresql.org/docs/8.1/static/app-createuser.html

Re: Understanding Roles & Grant Options

От
Tom Lane
Дата:
Carlos Mennens <carlos.mennens@gmail.com> writes:
> I've been reading the documentation and I'm trying to understand what
> 'GRANT' options make up a 'superuser' in PostgreSQL.

Superuser-ness is not a grantable privilege; it's an attribute of a
role.  See CREATE/ALTER ROLE.

> Obviously 'Carlos' is a superuser but what does that exactly entail
> beyond CREATEDB & CREATEROLE?

A superuser succeeds at any privilege test whatsoever.

            regards, tom lane