Stephen-McDaniel / rpostgresql

This repository is an export of the final version from the retired Google Code system (code.google.com/p/rpostgresql).
0 stars 0 forks source link

dbWriteTable requires postgres account #9

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
0.  Define a normal user in postgres (EG, not just the superuser
    "postgres" account.
1.  As that user, create a new table in the DB with 'create 
    table foo ...'
2.  Verify that the user can insert a record with 'insert into table foo'
    in postgres.
2.  Make a compatible data frame in R
3.  In R, connect as the user account and run 'dbWriteTable()'

What is the expected output? What do you see instead?

Expected output is that if a user can write to the table,
dbWriteTable() should work.

Actual result is this:

Error in postgresqlExecStatement(conn, statement, ...) : 
  RS-DBI driver: (could not Retrieve the result : ERROR:  must be superuser
to COPY to or from a file
HINT:  Anyone can COPY to stdout or from stdin. psql's \copy command also
works for anyone.
)
[1] FALSE
Warning message:
In postgresqlWriteTable(conn, name, value, ...) :
  could not load data into table

What version of the product are you using? On what operating system?

This is R 2.10 using RPosgresSQL 0.1-6 on Windows 7,
working against Postgres 8.4.1.

Please provide any additional information below.

ps.  Thanks for creating RPostgreSQL.  It's nice to be able to use two good
tools together.

Original issue reported on code.google.com by rareitme...@gmail.com on 1 Nov 2009 at 5:23

GoogleCodeExporter commented 9 years ago
True also with a PostgreSQL server 8.1 on Solaris 8 and R from an Xubuntu

Original comment by marco.p....@gmail.com on 29 Jun 2010 at 12:36

GoogleCodeExporter commented 9 years ago
I believe this have been fixed as of r144

Original comment by tomoa...@kenroku.kanazawa-u.ac.jp on 13 Oct 2010 at 2:42