SQLite Forum

Is the lifetime of argv in sqlite3_module::xConnect greater than sqlite3_module::xFilter?
Login
If I have a SQLITE virtual table, can I store a direct pointer value from argv (const char*) inside sqlite3_module::xConnect to use later in a call to sqlite3_module::xFilter? Specifically the address of the module name inside argv[0].


Basically the type name of my underlying pointer type is the same as the module name of the Virtual Table, so it would be used for sqlite3_value_pointer during xFilter.

I just need to know whether the lifetime of the module name is guaranteed for the life of the Virtual Table, or do I need to deep copy it.

(It seems to work).