Quantcast
Channel: Why is a new user allowed to create a table? - Database Administrators Stack Exchange
Viewing all articles
Browse latest Browse all 4

Answer by Adrian Macneil for Why is a new user allowed to create a table?

$
0
0

If you only want to prevent new users from creating tables, you need to run the following command:

REVOKE CREATE ON SCHEMA public FROM public;

If you REVOKE ALL (as other answers suggest), you will also prevent users from having USAGE permissions. USAGE means that users can use the permissions assigned to them, so if you remove that then your users will not be able to list or access tables that they have access to.

Alternatively, you could also REVOKE CREATE for a specific user:

REVOKE CREATE ON schema public FROM myuser;

See also: How to create a read only user with PostgreSQL.


Viewing all articles
Browse latest Browse all 4

Trending Articles