[R] RPostgreSQL, RS-DBI error

Tomas Lanczos lanczos at fns.uniba.sk
Thu Jul 3 18:58:14 CEST 2014




On Thu, 2014-07-03 at 11:09 -0500, John McKown wrote:
> On Thu, Jul 3, 2014 at 9:49 AM, Tomas Lanczos <lanczos at fns.uniba.sk> wrote:
> >
> > Hello all,
> >
> > I have a problem with the connection to a Postgresql database in R.
> > At first, some system information:
> > Fedora 2.0,
> > R 3.1.0 compiled from source,
> > Postgresql 9.2
> >
> > I installed the RPostgreSQL package in R with all the dependencies
> > also.
> >
> > When I'm trying to connect to the database using the following commands:
> >
> > library(DBI)
> > library(RPostgreSQL)
> > drv <- dbDriver("PostgreSQL")
> > con <- dbConnect(drv,
> > dbname="Litava",host="localhost",port=1234,user="postgres",password="****")
> >
> > I'm getting an error message:
> > ERROR:
> > RS-DBI driver
> >
> > with no other error specification. Do have somebody an idea could be
> > wrong with this?
> >
> > Thank You in advance for any advice
> >
> > Tomas
> >
> > --
> > Tomáš Lánczos, PhD
> 
> I also use PostgreSQL on Fedora 20. I don't have any problems. What
> you might want to try is removing the host= and port= arguments from
> your dbConnect
> 
> con <- dbConnect(drv,dbname="Litava",user="postgres",password="****");
> 
> I let the host= and port= default. Also, at least in my version, the
> port is not "1234", but is "5432". So that may be the problem.
> 

OMG, I'm so stupid, the port is "5432" also in my version! Thank You
very much, it works now :).

Have a nice day and sorry for bothering :)

Tomas



More information about the R-help mailing list