小编Iva*_* S.的帖子

Postgres 用户无法从公共表中进行选择

您好,我的 postgresql db \dt 输出中有一个用户:

 test=> \dt
                  List of relations
 Schema |           Name           | Type  |  Owner
--------+--------------------------+-------+----------
 public | code                     | table | postgres
 public | code_to_indicator        | table | postgres
 public | indicator                | table | postgres
Run Code Online (Sandbox Code Playgroud)

正如您所看到的,表的所有者是 postgres 但如果为 postgres 用户运行 \dt 命令,它会显示:

postgres=# \dt
Did not find any relations.
Run Code Online (Sandbox Code Playgroud)

这怎么可能?另外,如果我尝试通过 postgres 用户进行选择,它也会失败:

postgres=# select * from indicator;
ERROR:  relation "indicator" does not exist
LINE 1: select * from indicator;
Run Code Online (Sandbox Code Playgroud)

有人可以帮忙吗?直到今天一切都很好,出了点问题我什至不知道是什么。PostgreSQL 版本:11.4

postgresql schema rights public

3
推荐指数
1
解决办法
4725
查看次数

标签 统计

postgresql ×1

public ×1

rights ×1

schema ×1