Skip to content

R and PostgreSQL - Writing data?

1 message · NISHIYAMA Tomoaki

#
Dear Kevin,
dbWriteTable() should be used to load all rows of a data frame to PostgreSQL.
This uses a single COPY and should be much faster than calling PQexecPrepared many times.

For prepared statement in RPostgreSQL, I think we should implement some mechanism to
access the prepared statement from R and make use of it by dbGetQuery or dbApply?
functions.

Best regards,