我想知道我的 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;