On Tue, Jul 1, 2008 at 4:05 PM, Igor Tandetnik <[EMAIL PROTECTED]> wrote:
> Will it? <the data is currently not in temp table> part is supposed to
> be false when the data is in fact currently in temp table. A WHERE
> clause that is always false will, naturally, produce no records.
Fair.  I hadn't thought of doing something like that.

>>  because we do not want to delete the data
>> from the temporary table (that involves a write and fsyncing).
>> However, I think I've come up with a solution:
>> CREATE TRIGGER ....
>> BEGIN
>>  INSERT OR REPLACE INTO temp_table
>
> REPLACE clause works by deleting a conflicting record then inserting a
> new one. Since you say you don't want to delete records from temp_table,
> I don't quite see what you are gaining.
We don't want to delete from the permanent table because we are trying
to avoid the write and fsync.  Our temporary table is in memory
(although regardless of that, temp tables don't fsync).

> UNION has nothing to do with primary key. It only eliminates duplicate
> records - records with all fields equal.
Hrm, that means I have a whole other problem to solve now :(

Cheers,

Shawn
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to