Professional Documents
Culture Documents
User Permissions
User Permissions
User Permissions
single user (both usually named postgres). You can run the following command to
check
the name of the active user
SELECT current_user;
The inital user has permission to create new db, tables, users, etc. In PostgreSQL
the term for such user is 'superuser'. A 'superuser' bypasses all permission checks
that other users face beore being allowed to perform an action.
They can be passed to any number of users, but it is very dangerous if too many
people has this type of access.
As a superuser, you may want to check the permissions of users in your db to ensure
compliance. The following tables and columns are useful for understanding the state
of any user's permissions:
As a superuser you can give yourself roles to check how a user with this role would
behave. You could try to create a table, change tables etc with a given role and
test with the role works as it should. As a superuser, you can give the superuser
role back to you anytime as well. To set a new role for you, type: