How can you create a ROLE which isn’t allowed to do anything?

Posted on

Question :

I want to create a role which by default isn’t allowed to do anything. It has basically zero permissions. Starting from such role, I want to grant the minimal set of permissions.

How can you make a role without any kind of permissions?

Answer :

Just use

CREATE ROLE foo;

Be aware of default privileges (https://www.postgresql.org/docs/current/static/sql-alterdefaultprivileges.html).

Leave a Reply

Your email address will not be published. Required fields are marked *