Postgresql 命令显示特定用户拥有的所有表
当我在Postgresql 命令显示特定用户拥有的所有表,postgresql,psql,Postgresql,Psql,当我在psql中使用\d命令时,我会得到所有用户的表和序列列表 是否有只显示特定用户为其所有者的表的命令?不是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 如果需要表格
psql
中使用\d
命令时,我会得到所有用户的表和序列列表
是否有只显示特定用户为其所有者的表的命令?不是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')
可能重复: