Re: [sqlite] [csv extension] Error while reading long lines

2010-05-18 Thread gwenn
Here is some tests: --- csv1.test +++ csv1.test @@ -23,10 +23,11 @@ # # csv-1.*: Creating/destroying csv tables. # csv-2.*: Linear scans of csv data. # csv-3.*: Test renaming an csv table. # csv-4.*: CREATE errors +# csv-5.*: Dirty header, long line, escaped quotes, escaped

Re: [sqlite] [csv extension] Error while reading long lines

2010-05-13 Thread gwenn
Done! Index: ext/csv/csv.c === --- ext/csv/csv.c +++ ext/csv/csv.c @@ -60,10 +60,11 @@ char *zRow; /* Buffer for current CSV row */ char cDelim; /* Character to use for delimiting columns */

Re: [sqlite] [csv extension] Error while reading long lines

2010-05-08 Thread gwenn
Ok, I've just added support to embedded new lines and partial support to escaped double-quotes. By partial support, I mean they are not unescaped yet... Index: ext/csv/csv.c === --- ext/csv/csv.c +++ ext/csv/csv.c @@ -120,10 +120,11

Re: [sqlite] [csv extension] Error while reading long lines

2010-05-08 Thread gwenn
While looking in csv1.test, I found a solution to the case when header row contains spaces: just wrap the column name with double quotes. Index: ext/csv/csv.c === --- ext/csv/csv.c +++ ext/csv/csv.c @@ -158,11 +158,11 @@

Re: [sqlite] [csv extension] Error while reading long lines

2010-04-24 Thread gwenn
http://www2.sqlite.org/src/dir?name=ext/csv On Sat, Apr 24, 2010 at 9:43 AM, Jan wrote: > This sounds very useful. But where can I get this extension? > > Sorry, I could not find anything. > > Jan > > Am 21.04.2010 20:22, schrieb gwenn: > > Thanks for this great extension. > >

Re: [sqlite] [csv extension] Error while reading long lines

2010-04-24 Thread Jan
This sounds very useful. But where can I get this extension? Sorry, I could not find anything. Jan Am 21.04.2010 20:22, schrieb gwenn: > Thanks for this great extension. > It works smoothly with 500Mo files. > > And it's a workaround to some shortcomings of the '.import' command: > - no need

[sqlite] [csv extension] Error while reading long lines

2010-04-21 Thread gwenn
Thanks for this great extension. It works smoothly with 500Mo files. And it's a workaround to some shortcomings of the '.import' command: - no need to create a table before, - no need to delete the header row before/after, - no error if the number of columns is not homogeneous, - ... It's a

Re: [sqlite] [csv extension] Error while reading long lines

2010-04-19 Thread Shane Harrelson
Thanks for the report. The extension is still very a much a work-in-progress and any feedback is greatly appreciated. -Shane On Sun, Apr 18, 2010 at 12:51 PM, gwenn wrote: > Hello, > There is a little bug/typo in the csv extension when lines exceed 100 > characters: >

[sqlite] [csv extension] Error while reading long lines

2010-04-19 Thread gwenn
Hello, There is a little bug/typo in the csv extension when lines exceed 100 characters: *** glibc detected *** sqlite3: realloc(): invalid pointer: 0x00ad1a78 *** === Backtrace: = /lib/libc.so.6[0x7f6dab009d16] /lib/libc.so.6(realloc+0x321)[0x7f6dab00fda1]