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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 06:20:43  来源:igfitidea点击:

Why command \dt gives - no relations found?

postgresql

提问by Sp1

I have created a database in postgres. It has 3 empty tables. The table has user tomas its Superuseralong with root. I am logged in as tomand connected to mydbdatabase. But still the commands \dor \dt- gives no relations found.

我在 postgres 中创建了一个数据库。它有3张空桌子。该表将 usertom作为其Superuserroot. 我以身份登录tom并连接到mydb数据库。但仍然是命令\d\dt-给出no relations found

Is there any alternate to SHOW TABLEin postgresql?

SHOW TABLEpostgresql 中是否有其他替代方法?

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 publicschema indicates permissions for the postgresrole, 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;