2

I've been having trouble connecting to an Azure Postgres database via RPostgres using RStudio.

When I try to connect using
dbConnect(RPostgres::Postgres(), dbname = db, host=host_db, port=db_port, user=db_user, password=db_password)

I get the message:

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: ""

This message is the same when I define the time zone in the connection string except it has my defined time zone mentioned.

Invalid time zone 'Australia/Melbourne', falling back to local time.

Using dbFetch then gives the error:

Error: CCTZ: Unrecognized output timezone: ""

Anyone have any idea what is going on here? I previously used the same package to connect to an AWS database with no problem.

I'm using RStudio 2022.07.1 Build 554, R version 4.2.1, RPostgres 1.4.4 and PostgreSQL 11 via Azure. I'm also connecting to Azure from behind a corporate VPN. I've made successful connections via other apps (e.g. pgAdmin, QGIS)

Regards,

Adrian

1
  • This is not a PostgreSQL message. The problem must be in R or the driver. Commented Oct 7, 2022 at 5:47

1 Answer 1

1

The problem is definitely with the RPostgres package. I just tried the RPostgreSQL package which worked. I still don't know what the error with the RPostgres package is but at least there is a simple workaround.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.