postgresql 为什么命令 \dt 给出 - 没有找到关系?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/40865564/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Why command \dt gives - no relations found?
提问by Sp1
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
.
我在 postgres 中创建了一个数据库。它有3张空桌子。该表将 usertom
作为其Superuser
与root
. 我以身份登录tom
并连接到mydb
数据库。但仍然是命令\d
或\dt
-给出no relations found
。
Is there any alternate to SHOW TABLE
in postgresql?
SHOW TABLE
postgresql 中是否有其他替代方法?
Could not find solution here
在这里找不到解决方案
I get results from - \dt *.*
.
我从 - 得到结果\dt *.*
。
采纳答案by HorsePunchKid
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;
这不是您的问题search_path
,可能是您的架构权限问题,如此处的答案中所述。请与\dn+
该public
架构指示的权限postgres
角色,如果没有,授予他们:GRANT ALL ON SCHEMA public TO public;