Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当我使用 in 中的\d命令时psql,我会得到所有用户的表和序列的列表。
\d
psql
是否有一个命令只显示特定用户是所有者的表?
不是 psql 命令:
select c.relname, relkind from pg_class c inner join pg_roles r on r.oid = c.relowner where r.rolname = 'that_owner' and c.relkind = 'r' order by c.relname
如果你想要表格和序列:
and c.relkind in ('r', 'S')