Articles → POSTGRESQL → Manage users in postgres database using psql

Manage users in postgres database using psql






Get the list of users on a database




Picture showing the command to get the list of database users

Click to Enlarge

select 
  * 
from 
  pg_user;



Create a new user




Picture showing the command to create the new user

Click to Enlarge

create user <user_name> with password ‘<password>’;



Grant permission




grant all on <database_name> to <user>



Posted By  -  Karan Gupta
 
Posted On  -  Monday, October 21, 2019

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250