Create a user

To create a user, connect to the database cluster and complete the following steps:

  1. At the psql prompt, create the user:
      CREATE USER USER_NAME
          WITH PASSWORD PASSWORD
          ATTRIBUTE1
          ATTRIBUTE2...;
      

    Enter the password when prompted.

    For more information about role attributes, see the PostgreSQL documentation.

  2. You can confirm the user creation by displaying the user table:
      SELECT * FROM pg_roles;