On 10/8/16, Jens Alfke <j...@mooseyard.com> wrote:
> What’s the compatibility of the new partial indexes* with deterministic
> functions in their WHERE clauses?
> I.e. if I create such an index, and then later the database is opened by an
> older version of SQLite, what happens? (Let’s say the function used in the
> WHERE clause is still properly registered.)

Databases that use functions in the WHERE clause of a partial index
will be unreadable by any version of SQLite prior to 3.15.0.

>
> I’m just trying to decide whether I can safely make use of this feature yet,
> since some places my code will run will have only the built-in iOS version
> of SQLite, which is currently 3.14.0 at best.

Why can't you statically link against the SQLite 3.15.0?  What compels
you to use whatever version of SQLite that iOS has built-in?


>
> (But I suppose that even if it’s not version-compatible, I can at least
> detect the situation when opening the db and issue a REINDEX command.)

That won't work.  Once SQLite sees that it cannot parse the schema, it
gives up and won't let you do anything.  You can work around it using
"PRAGMA writable_schema=ON" but that comes with its own peril.


-- 
D. Richard Hipp
d...@sqlite.org
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to