This article is half-done without your Comment! *** Please share your thoughts via Comment ***
In this post, I am sharing a REVOKE script for stopping the new user from creating a new Table in PostgreSQL Database.
Whenever you create a new DB User in PostgreSQL, by default he or she can create a table in the PUBLIC schema of the assigned database.
If you want to stop this, revoke CREATE permission of that user and give only read-only permission.
PostgreSQL: Why New User can access all Databases without any Grants
Revoke permission for all users (For public schema):
1 |
REVOKE CREATE ON SCHEMA public FROM public; |
Revoke permission for a specific user (for public schema):
1 |
REVOKE CREATE ON schema public FROM user_name; |
Leave a Reply