title: how to create duplicate role of a user in postgres
body: <p>I need a new user but it should be granted all those privileges that the other existing user/role has.</p>
  
  <p>e.g.</p>
  
  <ul>
  <li>User A has SELECT privileges on Table1</li>
  <li>User A has EXECUTE privileges on Table2</li>
  <li>...</li>
  </ul>
  
  <p>If a new User B is created, I need the same privileges as,</p>
  
  <ul>
  <li>User B has SELECT privileges on Table1</li>
  <li>User B has EXECUTE privileges on Table2</li>
  <li>...</li>
  </ul>
  
  <p>Dont ask why :/</p>
  
  <p>Actually User A has custom privileges on different tables, schemas, and functions; so its very tedious and lengthy process to manually grant permissions to the new user. Any help would be good. </p>