[R-sig-DB] Parameterised queries

Hadley Wickham h@w|ckh@m @end|ng |rom gm@||@com
Wed Feb 11 22:07:45 CET 2015


>> I think the API should be as safe as possible by default, and
>> sacrificing safety for speed should only be done explicitly when the
>> user asks for it.
>
> My use cases are not so sensitive, but I agree with the general idea. Also,
> you really do not gain much over regular looping as inserts are really slow,
> at least in postgresql.

Yes, I'm just working on that for RPostgres. Parameterised inserts are
actually slower than sending one giant SQL string. RPostgreSQL uses
COPY ... FROM STDIN (and manually converts the data frame into a
single c string) for better performance

Hadley

-- 
http://had.co.nz/




More information about the R-sig-DB mailing list