Hello!
On Monday 01 March 2010 14:48:46 Dan Kennedy wrote:
>
> On Mar 1, 2010, at 6:08 PM, Alexey Pechnikov wrote:
>
> >> It would seem to me that asking [1='1'] *should* return false
> >> because the
> >> numeric and character string value domains are logically disjoint,
> >> so no value
> >> from one could ever equal a value from another, and so SQLite's
> >> answer is correct.
> >
> > See http://sqlite.org/datatypes.html:
> > "If both inputs look like well-formed numbers, then they are
> > converted into floating point values using atof() and compared
> > numerically."
>
> That document is for version 2. Version 2 and version 3 handle
> this kind of thing differently.
Oh, yes. But the 0 as result of 1='1' is incompatible. See:
template1=# select 1='1';
?column?
----------
t
(1 запись)
template1=# select version();
version
----------------------------------------------------------------------------------------------------------------
PostgreSQL 8.1.15 on i486-pc-linux-gnu, compiled by GCC cc (GCC) 4.1.2
20061115 (prerelease) (Debian 4.1.1-21)
(1 запись)
And
template1=# select 1='1';
?column?
----------
t
(1 запись)
template1=# select version();
version
----------------------------------------------------------------------------------------------
PostgreSQL 8.3.9 on i486-pc-linux-gnu, compiled by GCC gcc-4.3.real (Debian
4.3.2-1.1) 4.3.2
And
template1=# select 1='1';
?column?
----------
t
(1 row)
template1=# select version();
version
----------------------------------------------------------------------------------------------------
PostgreSQL 8.4.2 on i486-pc-linux-gnu, compiled by GCC gcc-4.4.real (Debian
4.4.3-2) 4.4.3, 32-bit
(1 row)
Best regards, Alexey Pechnikov.
http://pechnikov.tel/
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users