我在使用RPostgres连接到Azure数据库时遇到了问题。
当我尝试用
dbConnect(RPostgres::Postgres(), dbname = db, host=host_db, port=db_port, user=db_user, password=db_password)
我收到这样的信息:
Warning message:
Invalid time zone 'UTC', falling back to local time.
Set the `timezone` argument to a valid time zone.
CCTZ: Unrecognized timezone of the input vector: ""当我在连接字符串中定义时区时,此消息是相同的,除非它提到了我定义的时区。
Invalid time zone 'Australia/Melbourne', falling back to local time.然后使用dbFetch给出错误:
Error: CCTZ: Unrecognized output timezone: ""有人知道这是怎么回事吗?我以前使用相同的包连接到AWS数据库,没有问题。
我通过Azure使用RStudio 2022.07.1 Build 554,R版本4.2.1,RPostgres 1.4.4和PostgreSQL 11。我还从一个公司VPN后面连接到Azure。我通过其他应用程序(如pgAdmin、QGIS)成功地建立了连接。
致以敬意,
禤浩焯
发布于 2022-10-09 22:25:38
问题肯定是RPostgres包的问题。我刚刚试用了RPostgreSQL包,它起作用了。我仍然不知道RPostgres包的错误是什么,但至少有一个简单的解决方法。
https://stackoverflow.com/questions/73981539
复制相似问题