PostgreSQL manages database access permissions using users and groups. Users own database objects (for example, tables) and can assign privileges on those objects to other users to control who has access to which objects.
Note: Starting from PostgreSQL version 8.1, users and groups were no longer distinct kinds of entities, now there are only roles. Any role can act as a user, a group, or both. The concept of roles subsumes the concepts of users and groups.
Navicat provides Manage Users to add, delete, edit users/groups, and grant/revoke privileges on the selected database, schema, table, view, function, sequence, language and tablespace. Only a superuser (a user who is allowed all rights) can add/delete users. PostgreSQL installs a single superuser by default named postgres. All other users must be added by this user, or by another subsequently added superuser.
The Manage Users for PostgreSQL Server 7.3 to 8.0 and PostgreSQL Server 8.1 to 8.4 are different.
PostgreSQL Server 7.3 to 8.0
Simply click to open the Manage Users window
and use the toolbar below, allowing you to add, edit and delete users/groups.
Add User
To add a new user
- Select the connection you wish to set privileges in the navigation pane.
- Click
to open the Manage Users window.
- Choose Edit -> Users ->
Add User from the menu or click the
Add User from the toolbar.
- Edit user properties on the appropriate tabs of the User Editor.
Edit User
To edit an existing user
- Select the connection you wish to set privileges in the navigation pane.
- Click
to open the Manage Users window.
- Select a user to edit under Users tab.
- Choose Edit -> Users ->
Edit User from the menu or click the
Edit User from the toolbar.
- Edit user properties on the appropriate tabs of the User Editor.
Edit User Privileges
To edit user privileges for database, schema, table, view, function, sequence, language and tablespace
- Select the connection you wish to set privileges in the navigation pane.
- Click
to open the Manage Users window.
- Select a user or multiple users under Privileges tab.
- Select the specific object you wish to set privileges with.
- Edit database specific privileges - Database Specific Privileges.
- Edit schema specific privileges - Schema Specific Privileges.
- Edit table specific privileges - Table Specific Privileges.
- Edit view specific privileges - View Specific Privileges.
- Edit function specific privileges - Function Specific Privileges.
- Edit trigger function specific privileges - Trigger Function Specific Privileges.
- Edit sequence specific privileges - Sequence Specific Privileges.
- Edit language specific privileges - Language Specific Privileges.
- Edit tablespace specific privileges - Tablespace Specific Privileges.
Note: When selecting multiple users/groups to set privileges on multiple objects at a time, refer to Privilege States for more details.
Delete User
To delete a user
- Select the connection you wish to set privileges in the navigation pane.
- Click
to open the Manage Users window.
- Select a user to delete in the tree view.
- Choose Edit -> Users ->
Delete User from the menu or click the
Delete User from the toolbar.
- Confirm deleting in the dialog window.
Add Group
To add a new group
- Select the connection you wish to set privileges in the navigation pane.
- Click
to open the Manage Users window.
- Choose Edit -> Groups ->
Add Group from the menu or click the
Add Group from the toolbar.
- Edit group properties on the appropriate tabs of the Group Editor.
Edit Group
To edit an existing group
- Select the connection you wish to set privileges in the navigation pane.
- Click
to open the Manage Users window.
- Select a group to edit under Groups tab.
- Choose Edit -> Groups ->
Edit Group from the menu or click the
Edit Group from the toolbar.
- Edit group properties on the appropriate tabs of the Group Editor.
Edit Group Privileges
To edit group privileges for database, schema, table, view, function, sequence, language and tablespace
- Select the connection you wish to set privileges in the navigation pane.
- Click
to open the Manage Users window.
- Select a group or multiple groups under Privileges tab.
- Select the specific object you wish to set privileges with.
- Edit database specific privileges - Database Specific Privileges.
- Edit schema specific privileges - Schema Specific Privileges.
- Edit table specific privileges - Table Specific Privileges.
- Edit view specific privileges - View Specific Privileges.
- Edit function specific privileges - Function Specific Privileges.
- Edit trigger function specific privileges - Trigger Function Specific Privileges.
- Edit sequence specific privileges - Sequence Specific Privileges.
- Edit language specific privileges - Language Specific Privileges.
- Edit tablespace specific privileges - Tablespace Specific Privileges.
Note: When selecting multiple users/groups to set privileges on multiple objects at a time, refer to Privilege States for more details.
Delete Group
To delete a group
- Select the connection you wish to set privileges in the navigation pane.
- Click
to open the Manage Users window.
- Select a group to delete in the tree view.
- Choose Edit -> Groups ->
Delete Group from the menu or click the
Delete Group from the toolbar.
- Confirm deleting in the dialog window.
PostgreSQL Server 8.1 to 8.4
Simply click to open the Manage Users window
and use the toolbar below, allowing you to add, edit and delete roles.
Add User
To add a new user (a role that allows to login)
- Select the connection you wish to set privileges in the navigation pane.
- Click
to open the Manage Users window.
- Choose Edit -> Users ->
Add User from the menu or click the
Add User from the toolbar.
- Edit user properties on the appropriate tabs of the Role Editor.
Add Role
To add a new role
- Select the connection you wish to set privileges in the navigation pane.
- Click
to open the Manage Users window.
- Choose Edit -> Roles ->
Add Role from the menu or click the
Add Role from the toolbar.
- Edit role properties on the appropriate tabs of the Role Editor.
Edit Role
To edit an existing role
- Select the connection you wish to set privileges in the navigation pane.
- Click
to open the Manage Users window.
- Select a role to edit under Roles tab.
- Choose Edit -> Roles ->
Edit Role from the menu or click the
Edit Role from the toolbar.
- Edit role properties on the appropriate tabs of the Role Editor.
Edit Role Privileges
To edit role privileges for database, schema, table, view, function, sequence, language and tablespace
- Select the connection you wish to set privileges in the navigation pane.
- Click
to open the Manage Users window.
- Select a role or multiple roles under Privileges tab.
- Select the specific object you wish to set privileges with.
- Edit database specific privileges - Database Specific Privileges.
- Edit schema specific privileges - Schema Specific Privileges.
- Edit table specific privileges - Table Specific Privileges.
- Edit view specific privileges - View Specific Privileges.
- Edit function specific privileges - Function Specific Privileges.
- Edit trigger function specific privileges - Trigger Function Specific Privileges.
- Edit sequence specific privileges - Sequence Specific Privileges.
- Edit language specific privileges - Language Specific Privileges.
- Edit tablespace specific privileges - Tablespace Specific Privileges.
Note: When selecting multiple roles to set privileges on multiple objects at a time, refer to Privilege States for more details.
Delete Role
To delete a role
- Select the connection you wish to set privileges in the navigation pane.
- Click
to open the Manage Users window.
- Select a role to delete in the tree view.
- Choose Edit -> Roles ->
Delete Role from the menu or click the
Delete Role from the toolbar.
- Confirm deleting in the dialog window.