On 18 Nov 2013, at 06:13, Simon Slavin <slav...@bigfraud.org> wrote: > On 18 Nov 2013, at 3:38am, Peter Aronson <pbaron...@att.net> wrote: > >> It might be simpler to simply specify a minimum release of SQLite that must >> be supported, > > Actually this is how lots of apps specify their file format. Part of the > file header is a version number. When the API opens the file it checks to > see that its version is equal or higher to the version number encoded in the > file. If not, it presents an error message. > > This means you don't have to encode complicated logic about which file > version requires which abilities. All you need to do is compare two > versions. It's neat.
That would be the ideal solution but, unless I missed it, there’s no such number in the sqlite database header that we can use for this purpose. Schema format number seems like the closest thing that you could use for this, but it wasn’t bumped with the addition of partial indices and without rowid. I guess Peter’s ‘try to open with SQLite 3.7’ heuristic is the best we’ll be able to do. The only downside of that approach is that you can’t distinguish between incompatible DDL and actual database corruption. Pepijn _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users