On Thu, Jun 28, 2012 at 2:48 PM, Richard Hipp <d...@sqlite.org> wrote: > Note that SQLite4 does not have a rowid (at last not always) so the whole > concept of autoincrement will need to be revisited. I don't think the old > SQLite3 way of doing autoincrement makes sense any more. Not good sense > anyhow. We (the community) needs to talk more about what ought to be done > here.
A change so big that it alone justifies the new major version number. Too many SQLite3 apps assume a rowid. But I agree that not having a rowid unless one is defined is the correct thing to do. I think AUTOINCREMENT should imply that the column values a) must be INTEGER, b) tracking the max value seen so far. (b) is tricky because it's tempting to not require an index on that column unless it's constrained to be unique (implied for a primary key), but then, if there is no index then ensuring that an autoincrement value is not used requires a leap of faith -- but again, if not declared unique then I think it's fair to assume that it isn't required to be unique. It's also possibly a good idea to just not have autoincrement. Let the application implement it, no? After all, it can, including via triggers. Nico -- _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users