我能够连接到数据库,写入表,读取它,但是 dbGetQuery 命令给出错误
Error: Failed to prepare query: ERROR: relation "table" does not exist LINE 1: SELECT DISTINCT ym.s.date FROM table.
dbListTables 命令返回 character(0)
和 dbExistsTable(conn = con, name ="table") [1] FALSE
.也就是说,如果表不在数据库中。你能告诉我为什么会这样以及如何解决这个问题吗?
问题无解
一般问题,所以我会给你一些提示。
尝试使用以下内容了解您的 PSQL 结构数据库:
\l - Display database
\c - Connect to database
\dn - List schemas
\dt - List tables inside public schemas
\dt schema1. - List tables inside particular schemas. For eg: 'schema1'.
Most of the cases you are not using the correct schema