Skip to content
Prev 311 / 1559 Next

Connecting to PostgreSQL/PostGIS from R (rgdal?)

On 6/2/07, Prof Brian Ripley <ripley at stats.ox.ac.uk> wrote:
It does look good. I've started experimenting with it and I may switch
entirely to RODBC. (I'm once again needing to do some work with very
large datasets.)
I guess what I mean is that -- unless I'm mistaken -- I cannot
override the data access routines. Lets say I have a C function that
takes an SEXP as an argument and the function expects that SEXP to
point to a data frame. I cannot call the same C function on an SEXP
that points to a PostgreSQL proxy object because the C code will try
to dereference memory offset from the base of the data portion of the
SEXP. In the case of the db handle, there is no data in memory! Or is
there now a full C-level function call interface for manipulating data
frames (that can handle type dependent dispatch)? Cool if so -- its
been awhile since I looked.

(Just as an example think about what happens when the data in a matrix
is passed to BLAS routines and what would happen if you tried to pass
the db handle to BLAS.)

THK