Hello!
On Monday 14 December 2009 01:35:46 Samuel Adam wrote:
> > It'is not the answer to my question. Why the unique index
> > can understand when REAL values are equal?
>
> Because the unique index is ... not converting binary to decimal.
So a index compare stored binary values... Thanks.
Bes
On Sun, 13 Dec 2009 17:02:05 -0500, Alexey Pechnikov
wrote:
> Hello!
>
> On Monday 14 December 2009 00:24:42 Samuel Adam wrote:
>> Smells like a decimal/binary rounding error.
>
> It'is not the answer to my question. Why the unique _index_
> can understand when REAL values are equal?
Because th
Hello!
On Monday 14 December 2009 01:14:25 Doug Currie wrote:
> The problem is that floating point values (in SQLite shell) do not have
> write-read idempotency
Please read my message again. The index work correct but why?
Best regards, Alexey Pechnikov.
http://pechnikov.tel/
__
On Dec 13, 2009, at 3:16 PM, Alexey Pechnikov wrote:
> As we can see, the unique index can check equlity of REAL values
> but the "=" operator can not. it's fantastic I think :-)
The problem is not the "=" operator...
sqlite> create table test (save_date REAL unique);
sqlite> insert into test
Hello!
On Monday 14 December 2009 00:24:42 Samuel Adam wrote:
> Smells like a decimal/binary rounding error.
It'is not the answer to my question. Why the unique _index_
can understand when REAL values are equal?
Best regards, Alexey Pechnikov.
http://pechnikov.tel/
__
On Sun, 13 Dec 2009 15:16:08 -0500, Alexey Pechnikov
wrote:
> Hello!
>
> I have some frustration about
>
> create table test (
> save_date REAL unique
> );
> insert into test values (julianday('now'));
> select * from test;
> 2455179.34204073
> insert into test select * from test;
> Error:
Hello!
I have some frustration about
create table test (
save_date REAL unique
);
insert into test values (julianday('now'));
select * from test;
2455179.34204073
insert into test select * from test;
Error: constraint failed
select count(*) from test where save_date=2455179.34204073;
0
A
7 matches
Mail list logo