繁体   English   中英

Postgres:获取所有模式的所有者

[英]Postgres: Get owner of all schemas

我想知道我的 postgres 数据库模式的所有者是什么。 我试过了

select * from information_schema.schemata s order by schema_name

但是当我为我们的 postgres 数据库使用可视数据库客户端时,似乎有比上面查询的结果更多的模式。 如何查看这些“隐藏”表的所有者? 我怀疑这与架构的所有者没有授予其他人查看架构有关,但我无法弄清楚。

尝试:

select r.rolname as schema_owner, ns.* from pg_namespace ns join pg_roles r on ns.nspowner = r.oid

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM