使用 PostgreSQL 9.6,我在公共模式下使用 pgAdmin 创建了新表。但是要访问表,我不能只使用表名。如果我使用 public."Book" 那么只有表是可访问的。
thrillio=# show search_path;
search_path
-------------
public
(1 row)
\d+ 显示所有表格..
thrillio=# \d+
List of relations
Schema | Name | Type | Owner | Size | Description
--------+-------------------+-------+----------+------------+-------------
public | Book | table | postgres | 8192 bytes |
public | KidFriendlyStatus | table | postgres | 0 bytes |
public | Movie | table | postgres | 8192 bytes |
public | User | table | postgres | 8192 bytes |
public | Weblink | table | postgres | 8192 bytes |
(5 rows)
thrillio=# select * from Book;
ERROR: relation "book" does not exist
LINE 1: select * from Book;
^
thrillio=# select * from public."Book";
id | title | profileUrl | publicationYear | publisher | authors | genre | amazonRating
----+-------+------------+-----------------+-----------+---------+-------+--------------
(0 rows)
这是预期的吗?我需要更改 search_path 来解决这个问题吗?