[R-sig-DB] Postgres to R date conversion and Writing NULL to postgres database using RpgSQL issue

Gabor Grothendieck ggrothend|eck @end|ng |rom gm@||@com
Thu May 12 03:44:30 CEST 2011


On Wed, May 11, 2011 at 12:36 AM, Gabor Grothendieck
<ggrothendieck using gmail.com> wrote:
> On Thu, Apr 21, 2011 at 6:32 AM, subodh agrawal <subodh.iitr using gmail.com> wrote:
>> Please comment on thses two queries.
>>
>> 1) While converting field of data type "date" selected form postgres,
>> RpgSQL gives error on windows  when field value is null.
>
> Thanks.  This reproduces the error.
>
> library(RpgSQL)
> DF <- data.frame(a = c(1, NA, 2), b = c(Sys.Date() + 1:2, NA), c =
> c("a", NA, "b"))
> con <- dbConnect(pgSQL(), user = "whatever", password = "whatever",
> dbname = "whatever")
> dbWriteTable(con, "DF", DF)
>

This is now fixed in the development version of RpgSQL.

-- 
Statistics & Software Consulting
GKX Group, GKX Associates Inc.
tel: 1-877-GKX-GROUP
email: ggrothendieck at gmail.com




More information about the R-sig-DB mailing list