从R

时间:2018-08-14 18:44:55

标签: r amazon-rds rpostgresql

我能够建立连接,现在可以看到对象,但是如何查看表列表和查询表呢?

library(DBI)
library(RPostgres)

con <- dbConnect(drv = RPostgres::Postgres(), 
             user = "XXXXXX", 
             password = "XXXXXX", 
             host     = "XXXXXX.us-east-1.rds.amazonaws.com", 
             port     = 5432, 
             dbname   = "XXXXXX")

> dbListObjects(con)
##                                    table is_prefix
## 1               <Id> schema = pg_catalog      TRUE
## 2             <Id> schema = aws_coretech      TRUE
## 3              <Id> schema = sfdc_global      TRUE

> dbListTables(con)
## character(0)

0 个答案:

没有答案