title: How do you change a user in PostgreSQL?
body: <pre><code>postgres=# \du
                           List of roles
  Role name |                   Attributes                   | Member of 
  
  -----------+------------------------------------------------+-----------
   postgres  | Superuser, Create role, Create DB, Replication | {}
   shorturl  | Superuser                                      | {}
  
  postgres=# create database shorturl;
  CREATE DATABASE
  
  postgres=# \c shorturl;
  You are now connected to database "shorturl" as user "postgres".
  
  shorturl=# 
  </code></pre>
  
  <p>My preference was to use database <strong><em>shorturl</em></strong> being the user <strong><em>shorturl</em></strong> and not <strong><em>postgres</em></strong>. How do I change the same? </p>
  
  <p>Thanks in advance. </p>