SQLite Forum

How to set the column separator for the CSV extension in the CLI?
Login
I'm not sure if/when I replied to this post... BUT IT ROCKS!!!

This implementation is only slightly different than the CSV version supplied with the SQLITE3 source and frankly I use them both.  What's awesome about this is that I've been able to load the extensions into my golang projects too. In fact my use-case loads a zipcode table with lat/long and I use another extension to compute the estimated, as the crow flies, distance between two zipcodes.

But one thing is missing from the mention. If you use chroot, like I did in both linux, freebsd and OpenBSD... you have to remember to copy the dependent libs from the root OS to the chroot in the same/similar path tree.

(hope that makes sense)

I compiled my vsv.c and moved it to the lib/ folder of my chroot dir.

I ran this to locate the DEPS

```
$ ldd lib/vsv.so 
lib/vsv.so:
        Start            End              Type  Open Ref GrpRef Name
        00000f929a569000 00000f929a572000 dlib  1    0   0      /home/rbucker/src/bppdash/lib/vsv.so
        00000f9323bc1000 00000f9323bf1000 rlib  0    1   0      /usr/lib/libm.so.10.1
```

I had to create 'usr/lib' and then copy '/usr/lib/libm.so.10.1' to 'usr/lib'.

then I was able to chroot and then load the extension.