How to Create User in PostgreSQL - Ubiq BI
ubiq.co › database-blog › create-user-postgresqlAug 28, 2020 · If you want to create user in a non-interactive manner, just run the following command after Step 1 above. postgres=# create user user_name with encrypted password 'mypassword'; Replace user_name and mypassword with new user’s username and password respectively. If you want to grant access to new user to your database sample_db, run the following command.
PostgreSQL: Documentation: 8.0: CREATE USER
www.postgresql.org › docs › 8Use ALTER GROUP to add the user to groups or remove the user from groups. PostgreSQL includes a program createuser that has the same functionality as CREATE USER (in fact, it calls this command) but can be run from the command shell. The VALID UNTIL clause defines an expiration time for a password only, not for the user account per se. In particular, the expiration time is not enforced when logging in using a non-password-based authentication method.
PostgreSQL: Documentation: 12: createuser
www.postgresql.org › docs › 12Description. createuser creates a new PostgreSQL user (or more precisely, a role). Only superusers and users with CREATEROLE privilege can create new users, so createuser must be invoked by someone who can connect as a superuser or a user with CREATEROLE privilege. If you wish to create a new superuser, you must connect as a superuser, not merely with CREATEROLE privilege.