List users in Vertica database

Query below returns list of users in Vertica database with their roles.

Query

select user_name,
       all_roles,
       is_super_user,
       is_locked,
       lock_time
from v_catalog.users
order by user_name;

Columns

  • user_name - name of the user
  • all_roles - granted roles to user
  • is_super_user - indicate if user is Vertica default super user
  • is_locked - indicate if user account is locked
  • lock_time - time when account was locked

Rows

  • One row represents one user in the database
  • Scope of rows: all users in the database
  • Ordered by username

Sample results

sample results