I’m implementing a table-valued function, i.e. a virtual table, and I’m a bit 
unsure whether it’s safe to use SQLITE_STATIC in result text I return from its 
column() callback.

The function is given a blob value from a table row, splits it up, and vends 
the individual sub-ranges of the blob as text values from rows of its virtual 
table. The text it returns points into the SQLite blob value given to the 
function (as argv[0] to its filter() callback.) So I’d like to avoid copying it 
into a malloc block if possible.

So my question boils down to whether a column result value from a virtual table 
can have a lifespan that outlives the table’s current iteration, i.e. after the 
next call to reset().

—Jens
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to