Re: [sqlite] Possible bug in type conversion prior to comparison

2013-05-13 Thread Petite Abeille
On May 13, 2013, at 6:12 PM, Simon Slavin wrote: > I should have asked you for (1,2,20) as well and we could see whether it > outputs '10' or '10.0'. But yes, it would appear that in Oracle, NUMERIC > means FLOAT. Nah. Plus there is no such type as 'NUMERIC' per se in

Re: [sqlite] Possible bug in type conversion prior to comparison

2013-05-13 Thread Michael Black
13.5 11.5 10.5 10 -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Simon Slavin Sent: Monday, May 13, 2013 11:12 AM To: General Discussion of SQLite Database Subject: Re: [sqlite] Possible bug in type

Re: [sqlite] Possible bug in type conversion prior to comparison

2013-05-13 Thread Paul van Helden
Actually, to be more accurate, the internal storage may be far from a float (as in IEEE double) but a divide on an integer-looking value will certainly be done with floating point math. On Mon, May 13, 2013 at 6:13 PM, Paul van Helden wrote: > > I should have asked you for

Re: [sqlite] Possible bug in type conversion prior to comparison

2013-05-13 Thread Paul van Helden
> I should have asked you for (1,2,20) as well and we could see whether it > outputs '10' or '10.0'. But yes, it would appear that in Oracle, NUMERIC > means FLOAT. > > Of course it does! All the others too. ___ sqlite-users mailing list

Re: [sqlite] Possible bug in type conversion prior to comparison

2013-05-13 Thread Simon Slavin
On 13 May 2013, at 5:08pm, Michael Black wrote: > Would appear it's not doing any casting to promote values but just promoting > everything to float. I should have asked you for (1,2,20) as well and we could see whether it outputs '10' or '10.0'. But yes, it would appear

Re: [sqlite] Possible bug in type conversion prior to comparison

2013-05-13 Thread Michael Black
essage- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Simon Slavin Sent: Monday, May 13, 2013 11:01 AM To: General Discussion of SQLite Database Subject: Re: [sqlite] Possible bug in type conversion prior to comparison On 13 May 2013, at 4:57pm, Michael

Re: [sqlite] Possible bug in type conversion prior to comparison

2013-05-13 Thread Simon Slavin
On 13 May 2013, at 4:57pm, Michael Black wrote: > Oracle gives the right answer too for example(contrary to what somebody said > earlier). > > create table numtypes (A NUMERIC, B NUMERIC, C NUMERIC); > insert into numtypes values (1, 2, 25.23); > insert into numtypes

Re: [sqlite] Possible bug in type conversion prior to comparison

2013-05-13 Thread Michael Black
org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Richard Hipp Sent: Sunday, May 12, 2013 6:29 PM To: General Discussion of SQLite Database Subject: Re: [sqlite] Possible bug in type conversion prior to comparison On Sun, May 12, 2013 at 7:55 AM, Tomasz Pawlak < tomasz.paw...@cs.put.poz

Re: [sqlite] Possible bug in type conversion prior to comparison

2013-05-12 Thread Richard Hipp
On Sun, May 12, 2013 at 7:55 AM, Tomasz Pawlak < tomasz.paw...@cs.put.poznan.pl> wrote: > > So, type of '1' is 'text'. > > * If one operand has INTEGER, REAL or NUMERIC affinity and the other > operand as TEXT or NONE affinity then NUMERIC affinity is applied to other > operand. " > > So, if we

[sqlite] Possible bug in type conversion prior to comparison

2013-05-12 Thread Tomasz Pawlak
Hello, First of all, I'm not sure is this a good place to report a SQLite bug, however let me try. SQLite version: 3.7.15.2 How to reproduce error: 1. Create in-memory (or disk, whatever) database 2. Execute following statements to prepare schema: CREATE TABLE data (id INTEGER PRIMARY KEY