Querious Help 5

Server Roles View — PostgreSQL

Use the Roles view to create, view, and manage PostgreSQL roles. A role is PostgreSQL's single concept for users and groups: A role can log in, own objects, and be a member of other roles.

The Roles view
The Roles view

Role List #

The left side of the view lists all roles. Select one to view and edit it in the panel on its right.

  • Create: click the Add button below the list.
  • Delete: select the role and click Remove, or right-click and choose Delete. A role that owns database objects can't be deleted until you transfer or drop them.

Role Attributes #

Attribute What it means
Login Whether the role can connect. Roles without it are typically groups that bundle privileges.
Superuser Bypasses all permission checks. Grant only when necessary.
Create Database May create databases.
Create Role May create other roles.
Connection Limit The maximum number of simultaneous connections. -1 is unlimited.
Password Used for authentication. Stored hashed and can't be retrieved.
Valid Until Optional expiry after which the password is no longer accepted.

Role Membership #

Roles can be members of other roles, which is how PostgreSQL does privilege groups. A member inherits the group's privileges if the membership has the INHERIT option. Manage membership in the Query View:

GRANT group_role TO member_role;
REVOKE group_role FROM member_role;