Postgresql – How to you create a ROLE which isn’t allowed to do anything

postgresqlrole

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?

Best Answer

Just use

CREATE ROLE foo;

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