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@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to