有没有办法在表上授予选择,但可以防止用户从中创建视图?

发布于 2025-01-19 18:08:37 字数 115 浏览 5 评论 0原文

我有一张桌子定期掉落并重新创建的桌子。我希望用户能够从中进行选择,但无法创建view s可以阻止这种自动掉落的发生,有没有办法这样做?如果相关,我们会陷入PostgreSQL 9.6上。

I have a table that gets regularly and automatically dropped and recreated. I would like users to be able to select from it but not be able to create VIEWs that would prevent this automatic dropping from happening, is there a way to do so? We're stuck on PostgreSQL 9.6, if that's relevant.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

放手` 2025-01-26 18:08:37

据我所知以及 Postgress 9.6 SELECT 的文档 权限允许从您已授予访问权限的表和对象中进行选择,但这不包括视图的创建。要创建视图,您需要 CREATE 权限,因此我的建议是您撤销用户的 CREATE 权限并授予 SELECT 权限

For what I know and the documentation for Postgress 9.6 SELECT privilege allow to select from tables and objects you have granted access to, but that doesn't include the creation of VIEWS. To create views you need the CREATE privilege, so my suggestion is that you revoke the CREATE privilege to the users and grant the SELECT one

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文