I think it would be useful to have a function like sqlite3_function_needed called from the parser (or whatever module) to give the application an opportunity to register the needed function seen in a SQL statement.

The idea came up from the sqlite3_collation_needed function which registers a callback when a not already registered collation is seen/needed.

Having this new function, only the used funtions so far would be registered (like collations) thus saving time and memory.

Sqlite internals (func.c) could also benefit from this api. This would speed up the sqlite3_open call (which registers all the built in functions.)

Reply via email to