Users & Roles

Create and edit PostgreSQL roles, their attributes, memberships and table access, with a preview of the exact SQL.

The Users & Roles window lets you manage PostgreSQL roles without writing CREATE ROLE and GRANT statements by hand. Every change is shown as SQL before it runs and is applied in a single transaction.

Requirements

  • PostgreSQL 10 or later only.
  • To create or edit roles, you need the CREATEROLE attribute or superuser.

Users & Roles isn't available for MySQL / MariaDB, SQL Server, SQLite, CockroachDB or Redshift.

Open Users & Roles

Choose View ▸ Users & Roles (⌥⌘U). The window opens for the current connection and remembers its size and position.

Role list

The list on the left shows every role:

  • Icons tell login roles apart from group roles.
  • Badges mark super (superuser) and you (the role you're connected as).
  • Type in Filter roles to narrow the list.
  • Tick System to show the predefined pg_ roles (hidden by default).
  • Use + to create a new role, − to drop the selected one, and the refresh button to reload.

Role fields

FieldDescription
NameThe role name.
PasswordOptional. When editing, leave it empty to keep the current password, or tick Remove to clear it.
Connection limitLeave empty for Unlimited.
Valid untilLeave empty for Never, or enter a date such as 2027-01-01.
CommentA comment stored on the role.

Attributes

  • Can log in
  • Superuser
  • Create databases
  • Create roles
  • Inherit privileges
  • Replication
  • Bypass row security
  • Read-only transactions — sets default_transaction_read_only for the role.

New roles start with Can log in, Read-only transactions and Read only table access, so a new user can't change data until you allow it.

Table access

Grant access to the tables of a schema in one step:

  1. Pick the Schema.
  2. Choose a preset:
PresetEffect
Leave as isDon't change existing grants.
No accessRevoke table privileges.
Read onlySELECT.
Read & writeRead and write privileges.
CustomPick from SELECT, INSERT, UPDATE, DELETE, TRUNCATE, REFERENCES and TRIGGER.

Also tables created later (by <you>) is on by default. It uses ALTER DEFAULT PRIVILEGES so tables you create in the future get the same access.

Privileges are set for all tables of a schema. Per-table and per-column privileges aren't supported.

Member of

Tick the roles this role should belong to. Unticking a role removes the membership.

Privileges

The Privileges in <database> list shows what the role can currently do in this database, with the Kind, Object, Privilege and Grant option. Click Revoke to remove a privilege.

Only privileges in the connected database are shown.

Apply changes

The footer collects your edits:

  • SQL preview (N) shows the N statements that will run.
  • Revert discards your edits.
  • Create Role (for a new role) or Apply (⌘S) runs them.

All statements run in one transaction, so either every change is applied or none is.

Safety and passwords

  • Role changes always ask for confirmation, even when the connection's safe mode is Silent.
  • They are blocked on Read only connections.
  • Passwords are sent as SCRAM-SHA-256 verifiers, never in plain text. Passwords must be ASCII.
  • In the SQL preview and in history, passwords are masked as '********'.