INSERT INTO TestReal values (9223372036854775807);INSERT INTO
TestReal values (9223372036854775807 - 1);INSERT INTO TestReal values
(9223372036854775807 - 2);INSERT INTO TestReal values
(9223372036854775807 - 3);sqlite>...>...>...>...>
I recognize that number on sight and it
lite-users@mailinglists.sqlite.org
Subject: Re: [sqlite] Bug: float granularity breaking unique contraint?
INSERT INTO TestReal values (9223372036854775807);INSERT INTO
TestReal values (9223372036854775807 - 1);INSERT INTO TestReal values
(9223372036854775807 - 2);INSERT INTO TestReal values
(9223372036854
> On 2/11/2018, at 8:23 AM, James K. Lowden wrote:
>
> On Wed, 31 Oct 2018 23:05:19 -0300
> Bernardo Sulzbach wrote:
>
>> So if you are inserting integers
>> into a real column, you are going to store integers. However, when you
>> select from it they are presented as reals and mix up (looking
>
> I don't think that explanation holds water.
>
I don't have proof that I am correct, but you can try to test my
hypothesis the following way:
Let there be 4 databases:
-- f1.db
create table t(a real unique); insert into t values(9223372036854775807.0);
-- f2.db
create table t(a real unique);
On Thu, 1 Nov 2018 01:18:26 +0100
szmate1618 wrote:
> But there seems to be an unintended
> workaround
>
> DROP TABLE IF EXISTS TestReal;CREATE TABLE TestReal(A REAL
> UNIQUE);INSERT INTO TestReal values (9223372036854775807);INSERT INTO
> TestReal values (9223372036854775807 - 1);INSERT INTO
It is not a bug AFAIK. SQLite uses what the documentation calls
dynamic typing for its actual values. So if you are inserting integers
into a real column, you are going to store integers. However, when you
select from it they are presented as reals and mix up (looking as if
there were duplicates,
Dear SQLite people,
Please bless me with your infinite wisdom.
I'm using SQLite 3.25.2 on Windows, downloaded the latest precompiled
binaries from the official page https://sqlite.org/download.htmlExecuting
the following code
DROP TABLE IF EXISTS TestReal;CREATE TABLE TestReal(A REAL
7 matches
Mail list logo