On 2018/03/23 3:59 PM, David Raymond wrote:
sqlite> create table foo (true boolean);
sqlite> insert into foo (true) values (false);
sqlite> select * from foo;
true
0
sqlite> select 1 is true;
1 is true
1
sqlite> select 1 is true from foo;
1 is true
0
sqlite> select 1, true, 1 is true from foo;
1|true|1 is true
1|0|0
Too much thinking, brain hurts now.
Well brain-hurtz, yes, but it's just an exercise in linguistic semantics
juxtaposed with query semantics. Or perhaps it is "techno-poetry". (If
the genre is new, I call naming-rights...)
You could as well have posed the query:
create table foo(blue, one);
insert into foo VALUES (1,true);
select blue, one from foo where one is blue or blue is true;
-- blue | one
-- ------------ | ------------
-- 1 | 1
Is the blue one true? or the true one blue? or is this the one true blue
in the foo?
We all remove unneeded complexity if it is better (and sometimes if it's
not better), but introducing willful obfuscation is not a thing I've
seen from too many programmers. I think we're safe from breaking
hysterical historical queries, but agree with needing it well-documented.
Cheers,
Ryan
_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users