Creating, altering, and deleting users - Amazon Redshift

Creating, altering, and deleting users

Database users are global across a data warehouse cluster (and not for each individual database).

  • To create a user, use the CREATE USER command.

  • To create a superuser, use the CREATE USER command with the CREATEUSER option.

  • To remove an existing user, use the DROP USER command.

  • To change a user, for example changing a password, use the ALTER USER command.

  • To view a list of users, query the PG_USER catalog table.

    select * from pg_user; usename | usesysid | usecreatedb | usesuper | usecatupd | passwd | valuntil | useconfig ------------+----------+-------------+----------+-----------+----------+----------+----------- rdsdb | 1 | t | t | t | ******** | | masteruser | 100 | t | t | f | ******** | | dwuser | 101 | f | f | f | ******** | | simpleuser | 102 | f | f | f | ******** | | poweruser | 103 | f | t | f | ******** | | dbuser | 104 | t | f | f | ******** | | (6 rows)