Re: How does connect privilege works?

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: How does connect privilege works?
Дата
Msg-id 5020CCA5.4040005@ringerc.id.au
обсуждение исходный текст
Ответ на How does connect privilege works?  (Shridhar Daithankar <ghodechhap@ghodechhap.net>)
Список pgsql-general
On 08/07/2012 11:51 AM, Shridhar Daithankar wrote:

> testdb2=# revoke connect ON database testdb2 FROM testuser1;
>
> REVOKE

You can't revoke a permission that isn't set. PostgreSQL doesn't have
explicit deny rules, so you can only remove a grant.

The documentation on databases doesn't seem to cover that very well,
with no listing of the default permissions.

You probably want to:

     REVOKE CONNECT ON DATABASE testdb2 FROM public;

which will leave only superusers and the database owner able to connect
to the DB. You can then:

     GRANT CONNECT ON DATABASE testdb2 TO whoever;


--
Craig Ringer


В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: timestamp with timezone and time zone name
Следующее
От: Craig Ringer
Дата:
Сообщение: JSON in 9.2: limitations