"Scott Hess" <[EMAIL PROTECTED]> writes:
> In fts tables all columns other than rowid are of type TEXT.  It
> doesn't matter what you put in the type, they will be of type TEXT.
> The rowid is the standard SQLite rowid, so it does provide an INTEGER
> PRIMARY KEY AUTOINCREMENT column.

Scott, thanks for your reply.  However, it seems that by default, the
magic ROWID column is of the eternally-unique variety; rather, it is
of the currently-unique variety:

    If no ROWID is specified on the insert, an appropriate ROWID is
    created automatically. The usual algorithm is to give the newly
    created row a ROWID that is one larger than the largest ROWID in
    the table prior to the insert. If the table is initially empty,
    then a ROWID of 1 is used. If the largest ROWID is equal to the
    largest possible integer (9223372036854775807 in SQLite version
    3.0 and later) then the database engine starts picking candidate
    ROWIDs at random until it finds one that is not previously used.

    ...

    If a column has the type INTEGER PRIMARY KEY AUTOINCREMENT then a
    slightly different ROWID selection algorithm is used....

    http://www.sqlite.org/autoinc.html

What I was looking for is a column whose value is unique across the
lifetime of the table (not just over the rows currently present in
it).  It seems that adding AUTOINCREMENT to a column in the table
achieves this effect.  Is this not possible under FTS2?

Thanks again for your help.

  - a

-- 
PGP/GPG: 5C9F F366 C9CF 2145 E770  B1B8 EFB1 462D A146 C380

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to