0

I'm trying to connect to a postgre database using RPostgreSQL. Here's my code :

drv <- dbDriver("PostgreSQL")
con <- dbConnect(drv, dbname='dbname',
                 host='10.10.111.111',
                 port='1983',user='user'
                 password='pass')

I am able to connect to the database using pgAdmin with the same parameters, the only difference is that, in pgAdmin, I have a "maintenance-db" line that I can't fill in dbConnect. I tried to put the maintenance-db in the dbname, but it doesn't work. As you probably noticed now, I am no db expert, I don't really know what is this "maintenance-db" thing... Any help would be appreciated !

Henri
  • 21
  • 2

1 Answers1

1

Had the same problem with a database hosted on Heroku. Heroku is also using the maintenance-db and forces ssl usage as well - which is not supported by RPostgreSQL. So I had to switch to RJDBC which worked very well

http://www.rforge.net/RJDBC/

http://ryepup.unwashedmeme.com/blog/2010/11/17/working-with-r-postgresql-ssl-and-mssql/

Hope this helps you out.

dnltsk
  • 1,037
  • 1
  • 8
  • 9