Postgresql Roles and Users
Show roles
select rolname from pg_roles;
Role
create role role_name; drop role role_name; grant role_name to user_name; revole role_name from user_name;
Grant
GRANT ALL PRIVILEGES ON DATABASE database_name TO role_name WITH GRANT OPTION;
Display grants with psql -l
List of databases
Name | Owner | Encoding | Access Privileges
-----------+----------+----------+-----------------------------------------------------------
d2 | ken | UTF8 | {=Tc/ken,ken=CTc/ken,dbo=C*T*c*/ken}
There are no comments on this page. [Add comment]