输入
sudo -u postgres
psql
切入数据库:
psql -d 数据库名
查看角色:
select * from pg_roles;
select * from pg_user;
权限查询:
select * from information_schema.table_privileges where grantee='cc';
创建postgresql角色:
CREATE ROLE name;
删除postgresql角色:
DROP ROLE name;
删除数据库:
DROP DATABASE dbname;