2016-11-29 218 views
2

我已经在postgres中创建了一个数据库。它有3个空表。该表具有用户tom作为其Superuser以及root。我登录为tom并连接到mydb数据库。但仍然命令\d\dt - 给no relations found为什么命令 dt给出 - 找不到关系?

postgresql中SHOW TABLE是否有任何替代?

找不到解决here

我得到的结果 - \dt *.*

+2

如果'\ dt *。*'工作但'\ dt'不工作,则表的模式为可能不在你的['search_path'](https://www.postgresql.org/docs/9.1/static/runtime-config-client.html#GUC-SEARCH-PATH) –

+0

http://stackoverflow.com/questions/2951875/PostgreSQL的,怎么办-I-设置的搜索路径 - 在 - 在用户级 – Sp1

回答

0

这不是您的search_path的问题,它可能是模式权限问题,如in the answer here所述。检查\dn+public模式表示postgres角色的权限,如果不是,则授予他们:GRANT ALL ON SCHEMA public TO public;