Online Documentation for SQL Manager for PostgreSQL

Roles and Privileges


PostgreSQL manages database access permissions using the concept of roles. A role can be either a database user, or a group of database users.

 

Roles can own database objects and can assign privileges on those objects to other roles to control who has access to which objects. Furthermore, it is possible to grant membership in a role to another role, thus allowing the member role use of privileges assigned to the role it is a member of.

 

Note: In PostgreSQL versions before 8.1, users and groups were distinct kinds of entities, but now there are only roles. Any role can act as a user, a group, or both.

 

SQL Manager for PostgreSQL provides tools for efficient management of PostgreSQL database roles and privileges:

User Manager

Allows you to manage PostgreSQL users.

Group Manager

Allows you to manage PostgreSQL groups.

Role Editor

Allows you to create and edit PostgreSQL roles.

Grant Manager

Allows you to grant/revoke privileges on databases and database objects.

 

Adding Users

In order to add a new user/role:

  • select the Tools | User Manager main menu item or use the corresponding btnUserManager toolbar button to open User Manager;
  • select the Add user... item from the context menu or within the Navigation bar;
  • define user/role properties and permissions using Role Editor.

 

Editing User Properties

In order to edit an existing user/role:

  • select the Tools | User Manager main menu item or use the corresponding btnUserManager toolbar button to open User Manager;
  • select the Edit user... item from the context menu or within the Navigation bar;
  • edit the user/role properties and permissions using Role Editor.

 

Deleting Users

In order to delete an existing user/role:

  • select the Tools | User Manager main menu item or use the corresponding btnUserManager toolbar button to open User Manager;
  • right-click the user/role to delete and select the Delete User item from the context menu or within the Navigation bar;
  • confirm deleting in the dialog window.

 

Adding Groups

In order to add a new group:

  • select the Tools | Group Manager main menu item or use the corresponding btnGroupManager toolbar button to open Group Manager;
  • select the Add group... item from the context menu or within the Navigation bar;
  • define group properties and permissions using Role Editor.

 

Editing Group Properties

In order to edit an existing group:

  • select the Tools | Group Manager main menu item or use the corresponding btnGroupManager toolbar button to open Group Manager;
  • select the Edit group... item from the context menu or within the Navigation bar;
  • edit the group properties and permissions using Role Editor.

 

Deleting Groups

In order to delete an existing group:

  • select the Tools | Group Manager main menu item or use the corresponding btnGroupManager toolbar button to open Group Manager;
  • right-click the group to delete and select the Delete Group item from the context menu or within the Navigation bar;
  • confirm deleting in the dialog window.

 

Managing Privileges

To define grants on database objects:

or