Skip to content
Back to formatted view

Raw Message

Message-ID: <CANnL8grpD_vnL8yXnq2tCD4t3Nzjx6vjp5Vodya9zzyGrgDc+Q@mail.gmail.com>
Date: 2015-02-12T17:22:08Z
From: Tim Keitt
Subject: Parameterised queries
In-Reply-To: <CABdHhvEaFUzQhidG=rfZgEarPtRAgD3WzTKGLodU7qWNN1XRhA@mail.gmail.com>

On Thu, Feb 12, 2015 at 10:48 AM, Hadley Wickham <h.wickham at gmail.com>
wrote:

> >> PL/R is able to pull vectors in from R, though RPostgreSQL cannot pulls
> >> arrays from PostgreSQL as vectors (though it would be great to have this
> >> feature).
> >>
> >
> > I've forgotten how DBI works, but an array should just come through in
> text
> > form and you can parse it how ever you want on the R side. You can also
> > send an array by converting it to a string of the appropriate format.
> >
> > rpg has a 'format_for_send' method that you can dispatch on any type to
> > convert it to something PostgreSQL can read. I'm working on something for
> > formatting strings returned from the server.
>
> I've started thinking about a general interface for DBI to do this
> too. It's particularly important for SQLite since it has such limited
> type information.
>

Perhaps its time for DBI2. As long as its not cAmEl. (I've become allergic.)

THK


>
> Ian, if you'd like RPostgres (https://github.com/rstats-db/RPostgres)
> to support arrays natively, please file an issue describing your use
> case and providing a reproducible example that creates a table with
> array data.
>
> Hadley
>
> --
> http://had.co.nz/
>



-- 
http://www.keittlab.org/

	[[alternative HTML version deleted]]