psql create user terminal code example
Example 1: psql create user
# https://www.postgresql.org/docs/8.0/sql-createuser.html
CREATE USER <username> WITH PASSWORD '<password>' VALID UNTIL '<date here>';
Example 2: how to create new user and database postgresql in ubuntu
psql=# grant all privileges on database <dbname> to <username> ;