On May 12, 2008, at 11:00 PM, Scott Baker wrote:

> D. Richard Hipp wrote:
>> Is there anybody still using a version of SQLite prior to version
>> 3.3.0 in a context where they might want to read a database file that
>> was created by the latest version of SQLite?
>>
>> The reason I ask is this:  SQLite understands two slightly different
>> file formats, format 1 and format 4.  (Ok, it also understands  
>> formats
>> 2 and 3, but they don't come into play here so ignore that fact for
>> the moment.)  In format 4, SQLite uses a tighter encoding for boolean
>> values and it honors the DESC keyword on indices.
>>
>> All versions of SQLite since 3.3.0 can read and write both format 1
>> and format 4.  But versions of SQLite prior to 3.3.0 could only
>> understand format 1.  New database files are created in format 1 by
>> default in order to be readable and writable by older versions of
>> SQLite.  I'm wondering if we have reached a point where this can
>> change.  Can we move to creating new database files in format 4 by
>> default.
>>
>> Please note that this is not a backwards compatibility break.  All
>> prior database files will still be readable and writable by any
>> version of SQLite after 3.3.0.  But this is a forwards compatibility
>> break.  Database files created by SQLite version 3.6.0 or later will
>> likely be unreadable by SQLite version 3.2.8 and earlier.
>>
>> If we do move to creating new database files in format 4 by default,
>> an application will still be able to create format 1 database files
>> using a pragma.  Or, a compile-time option can be used to force  
>> format
>> 1 databases to be used as the default.
>>
>> FWIW, SQLite version 3.3.0 was released over 2 years ago on January
>> 10, 2006.
>
> What's the advantage to making all new DBs created format 4? I'm  
> against
> breaking backwards compatibility. One of the most annoying this about
> SQLite is that version 3.x can't open version 2.x databases (which
> unfortunately are still out there).

I think the short answer is that with version 4:

   * Descending indexes are properly supported, and
   * Integer values 0 and 1 consume a single byte of space in a database
     record. With format version 1 they consume 2 bytes.

Dan.


_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to