On 15 May 2016, at 3:59pm, Mikael <mikael.trash at gmail.com> wrote:
> What about writing it there, for everyone to understand how robust "PRAGMA > integrity_check" really is? > > > (Without that clarification, it looks like it'll just check database format > correctness and the relative consistency of UNIQUE columns.) It does check that the values stored in the index match the values stored in the table, and that the index does show the rows sorted in the right order. It does a bunch of similar stuff relating to schema and primary keys. It also checks a number of things stored in the database which you don't realise exist unless you've read the documentation on the file format. If you want to know all it does you'll have to read the source code. However, the normal note applies: if you absolutely need to know that your database is completely consistent (i.e. you're sending it to the Pluto Rover and retransmission is hideously expensive) then either perform a VACUUM or send the database as a text file of INSERT commands. Simon.