Postgres SCHEMA 隔离 [英] Postgres SCHEMA isolation

查看:47
本文介绍了Postgres SCHEMA 隔离的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否可以在 postgres 数据库(高于 8.3 的版本)上创建一个只能访问某个指定模式的用户.问题是,在我的数据库中,我有一些模式.如果我撤销某个用户对除一个以外的所有模式的所有权限,他仍然可以使用即 PgAdmin 工具浏览数据库.通过浏览,他实际上可以看到数据结构和所有功能,尽管他无法查询任何内容.是那种模式隔离,即某些用户根本无法知道 Postgres 数据库中是否存在其他模式?

I was wandering if it's possible to create a user on a postgres database (version higher than 8.3) which could access only a certain specified schema. The problem is, that on my database I have a few schemas. If I revoke all privileges from a certain user on all schemas except one, he can still browse the database using the i.e. PgAdmin tool. By browsing he can actually see the data structure, and all the functions although he cannot query anything. Is the kind of schema isolation, in which certain user wouldn't be able to know if the other schemas exist possible in Postgres database at all?

谢谢!

推荐答案

不,没有办法完全隐藏数据库中对象的存在 - 只是对它们的访问.如果您需要隐藏数据结构(出于某种原因),您将需要使用不同的数据库.

No, there is no way to hide the existence of objects inside a database completely - just the access to them. If you need to hide the data structure (for some reason), you will need to use different databases.

这篇关于Postgres SCHEMA 隔离的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆