Listing users
\du
Creating new user(ROLE)
CREATE ROLE dineshprabu WITH LOGIN PASSWORD 'xxxxyyyyy';
Assigning privileges to the user. Possible roles can be found on \du
.
ALTER ROLE dineshprabu CREATEDB;
Checking current user
select current_user;