#
Create a User
This tutorial explains to you how to create a user in PostgreSQL. We use pgAdmin4 and a PostgreSQL 9.6.
Only superusers and users with CREATEROLE privilege can create new users.
Here are the steps for creating a user in PostgreSQL using the pgAdmin4 :
Right click on "Login/Group Roles", choose "Create", choose "Login/Group Role ...".
In the "General" tab, enter the name, the owner of the user and a description of the user.
In the "Definition" tab, enter the Password, when the Account expires and the Connection limit.
In the "Privileges" tab, enter the privileges you want for that user.
In the "Membership" tab, enter the roles you want to grant to that user.
In the "Parameter" tab, enter the Parameters for that user if you want.
In the "Security" tab, enter the Security information if needed.
You can click on SQL tab to see the SQL command used for creating that user.
Click on "Save" to create that user.
CREATE USER joe WITH
LOGIN
NOSUPERUSER
NOCREATEDB
NOCREATEROLE
INHERIT
NOREPLICATION
CONNECTION LIMIT -1
PASSWORD 'xxxxxx';