I agree, that Buffer objects (Stdio.Buffer, String.Buffer, etc.) are the natural API for binary data, however, they are not thread safe. As far as I can tell the SQLite module will allow other threads to run, who may invalidate the buffer storage (realloc or similar). We probably need to use SQLITE_TRANSIENT there.
The same problem was (I think) also present in the previous version using strings in multisets.
pike-devel@lists.lysator.liu.se