当前位置:首页 > PG数据库给指定用户授予访问指定表的权限

PG数据库给指定用户授予访问指定表的权限

点击次数:515  更新日期:2023-10-26

--列出所有用户

select * from pg_user


--查询用户可以访问哪些表

select * from information_schema.role_table_grants where grantee='[用户名]';


--为用户授予访问表的权限

grant select on [表名] to [用户名]