-- 移除数据库的权限
revoke all on database databasename from username;
databasename :数据库的名字
username : 角色的名字
-- 移除schema的权限
revoke all on schema schema1,schema2 from username;
schema1,schema2 : schema的集合,以逗号分开
username : 角色的名字
select 'revoke all on '||table_schema||'.'||table_name||' from username cascade; ' from
information_schema.table_privileges
where grantee='username';
username : 角色的名字
用此语句查询出revoke的语句,去执行即可
-- 查询该用户的所属的函数
select * from information_schema.routine_privileges where grantee='username';
-- 移除权限
revoke all on function schemaname.functionname from username;
username : 角色的名字
使用第一个语句把该角色关于函数的语句查询出来,使用第二个语句撤销语句即可
drop role if exists username;
username : 角色的名字
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。