On 2/9/16, Peter Aronson <pbaronson at att.net> wrote: > So, why *isn't* metadata preserved between function calls for data values?
Because the database value will likely change, rendering the metadata obsolete. The metadata is only preserved when the value is a constant. That mechanism is intended for operators like x REGEXP 'pattern' For regular expression processing, one typically compiles the regular expression into byte-code, then runs the compiled regular expression against a string to see if it matches. The meta-data is the compiled byte-code. But that code is only valid as long as the pattern does not change. -- D. Richard Hipp drh at sqlite.org