问题在PostgreSQL中创建仅阅读用户,该用户通过公共模式获得更大的许可而导致用户
我正在学习PostgreSQL,现在我正在尝试创建一个只读的用户。
CREATE USER user WITH PASSWORD 'password';
GRANT CONNECT ON DATABASE my-database TO user;
GRANT USAGE ON SCHEMA public to user;
GRANT SELECT ON ALL TABLES IN SCHEMA public to user;
但是,我使用public schema
的问题遇到了问题,该>具有创建数据库和其他数据的权限。
我不想影响其他用户或修改公共模式。 授予完全阅读访问的最佳方法是什么?
感谢新手!
I'm learning PostgreSQL and now I'm trying to create a read-only user.
CREATE USER user WITH PASSWORD 'password';
GRANT CONNECT ON DATABASE my-database TO user;
GRANT USAGE ON SCHEMA public to user;
GRANT SELECT ON ALL TABLES IN SCHEMA public to user;
However, I'm having issues using the public schema
which has permissions to CREATE databases and others.
I don't want to affect other users or modify the public schema.
What would be the best way to GRANT FULL ONLY READ ACCESS?
Thanks from a newbie!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

如果不修改
public
架构,则无法解决此问题。你必须You cannot solve this problem without modifying the
public
schema. You will have to