[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
Fri May 13 00:39:29 CEST 2011


On Wed, May 11, 2011 at 9:44 PM, Gabor Grothendieck
<ggrothendieck using gmail.com> wrote:
> 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.
>

And its now on CRAN as version 0.1-5:

   http://cran.r-project.org/web/packages/RpgSQL/index.html

and should propagate to the other mirrors shortly.

-- 
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