On Sat, 12 Feb 2011 19:14:51 +0000, Simon Slavin
<slav...@bigfraud.org> wrote:

>
>On 12 Feb 2011, at 11:43am, Kees Nuyt wrote:
>
>> There are just three cases:
>> - i < j
>> - i > j
>> - i and j are the same.
>> 
>> If  j < i just swap the values.
>
> and given what real-world situation the data reflects,
> the third case can't happen.

You're right. In my implementation it changes the table constraint
from:
,       CONSTRAINT key_order CHECK (i <= j)
to:
,       CONSTRAINT key_order CHECK (i < j)

and
INSERT INTO v (i,j) VALUES (4,4);
will fail.
-- 
  (  Kees Nuyt
  )
c[_]
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to