Skip to content

append=TRUE, overwrite=FALSE ignored in dbWriteTable

2 messages · Elinor Zeev, Tomoaki NISHIYAMA

#
Hello,
Within a bigger loop, I want to write results to a table in Postgress,

the overwrite and append arguments are ignored and I end up with only the
current data in the table and the older data is overwritten.
My code is;

ifelse((dbExistsTable(con, "region_subgroup_mktseg")),
dbWriteTable(con, "region_subgroup_mktseg", results_tograph,  append=TRUE,
overwrite=FALSE),
 dbWriteTable(con, "region_subgroup_mktseg", results_tograph))

R.version
               _
platform       i386-pc-mingw32
arch           i386
os             mingw32
system         i386, mingw32
status
major          2
minor          13.2
year           2011
month          09
day            30
svn rev        57111
language       R
version.string R version 2.13.2 (2011-09-30)

Thank you
#
Hi,

Can you tell the PostgreSQL driver version?

BTW,
dbWriteTable(con, "region_subgroup_mktseg", results_tograph,  append=TRUE)
should work without prior check for dbExistTable.