为什么命令 \dt 给出 - 没有找到关系? [英] Why command \dt gives - no relations found?
问题描述
我在 postgres 中创建了一个数据库.它有3张空桌子.该表将用户 tom
作为其 Superuser
以及 root
.我以 tom
身份登录并连接到 mydb
数据库.但仍然是命令 \d
或 \dt
- 给出 没有找到关系
.
I have created a database in postgres. It has 3 empty tables. The table has user tom
as its Superuser
along with root
. I am logged in as tom
and connected to mydb
database. But still the commands \d
or \dt
- gives no relations found
.
在 postgresql 中是否有 SHOW TABLE
的替代方法?
Is there any alternate to SHOW TABLE
in postgresql?
找不到解决方案此处
我从 - \dt *.*
得到结果.
I get results from - \dt *.*
.
推荐答案
这不是您的 search_path
的问题,可能是您的架构权限问题,如在这里的答案.使用 \dn+
检查 public
架构是否指示 postgres
角色的权限,如果没有,则授予它们:GRANT ALL ONSCHEMA public TO public;
It is not a problem with your search_path
, it could be an issue with your schema permissions as described in the answer here. Check with \dn+
that the public
schema indicates permissions for the postgres
role, and if not, grant them with: GRANT ALL ON SCHEMA public TO public;
这篇关于为什么命令 \dt 给出 - 没有找到关系?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!