新建的用户无法访问新建的schema中的表数据
postgresql吧
全部回复
仅看楼主
level 2
风栖树 楼主
通过apt安装的PostgreSQL16.2,通过postgres超管用户启动的psql
使用postgres用户登录psql命令行,创建了一个database:pgtest
然后在pgtest中创建了一个新的schema:jiaofayuan
在psql命令行中创建了一个用户pguser,并把pgtest和jiaofayuan、public都授权给了pguser
create user pguser with password 'Adminadmin';
grant all privileges on database pgtest,pgtest2 to pguser;
grant all privileges on all tables in schema public,jiaofayuan to pguser;
为什么pguser能查询public中的表数据,但是无法查询jiaofayuan中的表数据呢?
hba中配置了全部访问权限。PostgreSQL小白求教,谢谢~
2024年04月01日 08点04分 1
level 2
风栖树 楼主
求大神指点下~
2024年04月02日 00点04分 2
level 1
grant USAGE on schema schema名字 to 用户名字;
2024年07月08日 22点07分 3
1