Hello Nicolas Williams,

>I suppose that to make this generic so that users can replace the
>regexp, like, and glob functions would require some new interfaces.

I believe so, too. The like and glob optimization is part of where.c and 
outside the reach of sqlite3_create_function().

>SQLite would have to be able to extract a constant prefix from the
>pattern in order to be able to use an idex in this case.

The regular expression engine I use is able to tell if a pattern is anchored at 
the beginning and which letter starts the pattern. I believe that this 
information is sufficient for an index to narrow down the search. SQLite just 
needs to provide the API to pass the prefix plus, possibly, which index to use.

I believe that this API would also ease implementations of Unicode LIKE and 
GLOB.

Ralf 


-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to