[R-sig-DB] [PATCH] segfault in RSQLite 0.5-4

Ashish Kulkarni @@h|@h@ku|k@rn| @end|ng |rom k@|yptor|@k@com
Mon Jul 16 12:21:19 CEST 2007


Seth Falcon wrote:

> I'm a bit surprised by this choice.  Can you explain why integer is
> the desired default?  I was expecting to see SQLITE_TEXT here -- if
> you don't know what a column in a result set is, you can always put it
> into a character vector in R, you cannot always convert it to
> integer.  Or am I missing something?
> 

Yep, you're right -- my scenario involved an integer, but I agree that
SQLITE_TEXT is the more generic option :-)

> The problem is that whenever a result set has a column with a NULL in
> the first row, the type will be forced to text.  I can think of ways
> of fixing this, but the solutions add complexity and will likely hurt
> performance.  I wonder if anyone has a suggestion here?  One idea is
> to provide a mechanism for users to specify the desired types of the
> columns in a resultset.

The patch fixes my problem. Also, what you describe is very much of an 
edge case, so I think we can leave it unaddressed at the moment.

BTW, the version of SQLite we bundle (3.3.8) is rather old, 3.4.0 being
the new version. Also, considering that this version introduces a simple
way of embedding SQLite in any other application, we should look into 
that approach: see http://www.sqlite.org/cvstrac/wiki?p=TheAmalgamation

It would reduce the source package size, increase the speed a bit and 
standardize the build process across *nix and Windows.

Regards,
Ashish




More information about the R-sig-DB mailing list