[R-sig-DB] best way to access PgSQL from R?

Jim McLoughlin j|mmc|ough||n @end|ng |rom e@rth||nk@net
Fri Jul 23 19:08:44 CEST 2004


Hi,

I'm having a problem with R.app on OSX, where it crashes when I invoke  
dbDisconnect(<myPgSQLconnection>).  This may not be a DBI specific  
problem, but I wanted to make sure I was using the right database  
packages to try and isolate why R is crashing.

 From what I've read, DBI does not yet support a PostgresSQL driver, so  
the latest driver is in the Rdbi and Rdbi.PgSQL modules, correct?

This is how I have been accessing PgSQL:

library("chron") #needed for date columns
library("Rdbi")
library("Rdbi.PgSQL")

pcon <-  
dbConnect(PgSQL(),host="localhost",dbname="test",user="postgres",passwor 
d="<mypassword>")

dbListTables(pcon)  #works fine, as do other SQL operations

dbDisconnect(pcon) #causes R to pause, then crash

Can someone confirm whether this is the most up-to-date way to access  
PostgresSQL databases (I'm running PostgresSQL 7.4.2)?

thanks,

Jim M




More information about the R-sig-DB mailing list