On 8 Sep 2016, at 10:43am, Richard Hipp <d...@sqlite.org> wrote: > On 9/7/16, David Empson <demp...@emptech.co.nz> wrote: >> >> every ATTACH DATABASE or >> DETACH DATABASE triggers a schema change... > > That's because the set of tables and indexes available to the query > planner changes, and so all of the SQL statements need to be reparsed > and replanned, to take into account those changes.
In other words, the "schema version number" value isn't there to count the number of times the schema has changed. It's there to signal the query planner that it needs to replan everything. The signal is used by other things than changes to the schema saved in the database. Simon. _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users