[R-sig-DB] dbWriteTable permission errors using RPostgreSQL

Prasenjit Kapat k@p@tp @end|ng |rom gm@||@com
Thu Nov 6 22:19:56 CET 2008


Hi,

I am using the rpostgresql-0.1-2 package with R 2.7.1 on a RedHat EL 5
machine. There were no errors/warning while installing it but I get
this permission error while using dbWriteTable:

>  if (dbExistsTable(con, "tmp_vidtable")) dbRemoveTable(con,"tmp_vidtable")
>  mydata2 <- data.frame(x=1:3, y=4:6)
>  dbWriteTable(con,"tmp_vidtable",mydata2)
 Error in postgresqlExecStatement(conn, statement, ...) :
   RS-DBI driver: (could not Retrieve the result : ERROR:  could not
open file "/tmp/rsdbi1da2f885" for reading: Permission denied)
 [1] FALSE
 Warning message:
 In postgresqlWriteTable(conn, name, value, ...) :
   could not load data into table

I can create tables using dbGetQuery, for example the following works:
> dbGetQuery(con, "create table tmp_vidtable AS ( select * from other_table )")
 [1] TRUE

Is it possible to hold this temporary file "/tmp/rsdbi..." (ie not get
deleted) and see the permissions on it?

I guess there is some problem in setting up the postgresql
server/user/roles/.... But I have not faced any such issues when
working from pgadminIII or directly from psql prompt, so I am not
exactly sure how to debug.

Any help is greatly appreciated. I really need to get this working....

Regards,
PK




More information about the R-sig-DB mailing list