Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/linq/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Postgresql 命令显示特定用户拥有的所有表_Postgresql_Psql - Fatal编程技术网

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')
可能重复: