On 31 Dec 2013, at 10:05pm, James K. Lowden <jklow...@schemamania.org> wrote:

> Meanwhile, here's a much more important failing that cannot be worked
> around within SQL without a temporary table:
> 
>       sqlite> create table i ( i int primary key );
>       sqlite> insert into i values (1);
>       sqlite> insert into i values (2);
>       sqlite> update i set i = i + 1;
>       SQL error: column i is not unique

Is that not actually a serious bug in SQLite ?  My understanding of SQL is that 
checks for consistency should occur at the end of a transaction, not at each 
row of an UPDATE.  I hadn't realised this problem existed.

I wonder whether it would be possible to fix this in SQLite4, if not before.  
SQLite4 implements PRIMARY KEYs properly, of course, but I don't know whether 
that means there'd have to be one fix or two.

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

Reply via email to