On Fri, Mar 28, 2014 at 8:52 AM, Stephan Beal <sgb...@googlemail.com> wrote:

> On Fri, Mar 28, 2014 at 1:50 PM, Simon Slavin <slav...@bigfraud.org>
> wrote:
>
> > But this is not a documented specification for SQLite.  It is allowed to
> > use any integer which is currently unused.  I have no idea whether it's
> > allowed to use negative integers.
> >
>
> This is not a definitive answer but is possibly a hint: fossil
> (primarily/originally authored by DRH) relies very much on the fact that
> record IDs (auto-incremented) have values greater than 0. Based on that, my
> strong assumption is that autoinc will never produce a negative value.
>
>

SQLite prefers small positive rowids, since such rowids take up less space
on disk using the variable-length integer encoding.  (
http://www.sqlite.org/fileformat2.html#varint).  But there are no
guarantees.

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

Reply via email to