Search Postgresql Archives

Re: How does connect privilege works?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux