I have a postgresql DB on Azure and I'm able to connect to it with DBeaver or with command line psql, but when I try to connect with RPostgreSQL I get an unknown error. I can't even read it properly in RStudio because the characters are not supported so I need to use R in command line to read it.
Here is the command I run:
require(DBI)
require(RPostgreSQL)
conn <- DBI::dbConnect(
RPostgreSQL::PostgreSQL(),
dbname = "my_db",
host = "my-db-nb1.postgres.database.azure.com",
port = 5432,
user = "my-name@my-db-nb1",
password = "mypass"
)
And I get the following result:
Error in postgresqlNewConnection(drv, ...) : RS-DBI driver: (À♀←)
I think that may be because of the -
in the url and/or the user (I changed the real config of course but I put an example that should be representative of the real one). @
shouldn't be a problem, as I've seen example of people using it to connect to azure db.
Am I the only one with this problem ? Do you have any idea how to get around it (unfortunately I cannot change the postgres url) ?