Re: [sqlite] rowid versus docid for fts3.

2007-09-02 Thread Ralf Junker
Scott Hess wrote: >Unfortunately, the reason fts2 couldn't be "fixed" was because you >can't perform the necessary ALTER TABLE if the column you're adding is >a primary key. Sure, I was aware of this problem. >Since the only alternative would be to build a new >table and copy everything over,

Re: [sqlite] rowid versus docid for fts3.

2007-08-31 Thread Scott Hess
Unfortunately, the reason fts2 couldn't be "fixed" was because you can't perform the necessary ALTER TABLE if the column you're adding is a primary key. Since the only alternative would be to build a new table and copy everything over, it seemed more reasonable to just let the app developer do

Re: [sqlite] rowid versus docid for fts3.

2007-08-31 Thread Joe Wilson
--- Ralf Junker <[EMAIL PROTECTED]> wrote: > This one just came to my mind: > > CREATE TABLE (rowid INTEGER PRIMARY KEY, t TEXT); > > This promotes "rowid" to a visible column "rowid" which does not change > during a VACUUM. "rowid" > is already a reserved word in SQLite. Maybe this option is

Re: [sqlite] rowid versus docid for fts3.

2007-08-31 Thread Ralf Junker
This one just came to my mind: CREATE TABLE (rowid INTEGER PRIMARY KEY, t TEXT); This promotes "rowid" to a visible column "rowid" which does not change during a VACUUM. "rowid" is already a reserved word in SQLite. Maybe this option is even compatible to FTS2? Ralf >ext/fts3.c in the

[sqlite] rowid versus docid for fts3.

2007-08-30 Thread Scott Hess
ext/fts3.c in the current code fixes the fts2-vs-vacuum problem by adding "docid INTEGER PRIMARY KEY" to the %_content table. This becomes an alias for rowid, and thus causes vacuum to not renumber rowids. It is safe to add that column because the other columns in %_content are constructed such