On Wed, Mar 9, 2011 at 11:44 PM, Simon Slavin <slav...@bigfraud.org> wrote:
>
> On 9 Mar 2011, at 10:37pm, Armin Kunaschik wrote:
>
>> Is it really DELETE and INSERT internally?
>
> As far as you can tell when how SQLite behaves, yes it is.
>
>> This would explain, why ctime is "invisible" inside the trigger...
>> it's simply not there
>> when replace is used.
>>
>> Maybe I should think about using a temporary table for that purpose...
>> any ideas?
>
> Why use a temporary table for it.  You appear to have two sets of data which 
> should not be in the same table.  One associates your primary key (the date) 
> with ctime, and another associates your primary key with text and mtime.  So 
> make two tables.  In one you use INSERT OR FAIL, in the other you use INSERT 
> OR REPLACE.

Great idea! In conjunction with the DEFAULT this would make things far easier.
And having the date in 2 tables instead of one is no disadvantage here.
I'll give it a try...

Thanks a lot!
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to