-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Nikolaus Rath wrote:
> The perfect solution would be to tell SQLite that it should restrict the
> rowid to 2^32, but I couldn't find a documented way to do that.

I have seen people post about an undocumented and unsupported compile time
option to restrict to a 32 bit row id:  SQLITE_32BIT_ROWID

If you compile SQLite with that flag then your requirements will be met
providing noone else modifies the database with a normal SQLite.

Another approach (if you can tolerate the occasional collision) is to use an
MD5/sha1 or similar checksum of the record and use the last 32 bits of that
checksum.  It is extremely unlikely for there to be a collision and you may
be able to modify the data on getting one (eg add superfluous space to a
string).

Roger
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAks7ydUACgkQmOOfHg372QRP9gCeNnRmHx7OgPdGtcF6wAUZPetn
BzEAoLVF6hbRkJZipudQI7ZxJYD59skB
=e3ap
-----END PGP SIGNATURE-----
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to