有没有办法在表上授予选择,但可以防止用户从中创建视图?
我有一张桌子定期掉落并重新创建的桌子。我希望用户能够从中进行选择,但无法创建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 VIEW
s 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
据我所知以及 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 theCREATE
privilege, so my suggestion is that you revoke the CREATE privilege to the users and grant the SELECT one