On 8/22/2013 9:01 PM, Roman Fleysher wrote:
create table t(x text collate nocase); insert into t values ('A'); select count(*) from t where x = 'a';In your opinion, what result should this select statement produce? 1, as it does now? 0, as Simon's approach seems to imply? Something else?Since logically it is the operation that needs a modifier, then it should be supplied and not derived from the operands. If I put aside backward compatibility and take position of purity and clarity to the extreme (because taking extreme positions clarifies thinking), then this should fail since no rule to compare is fully specified. The "=" must be accompanied by a modifier. Once the modifier is supplied, comparison can proceed and index can be identified. Thus, I would use lengthy version for clarity: create table t(x text) create index t(x collate nocase) create index t(x collate someothercase) insert into t values ('A'); select count(*) from t where x = 'a' nocase;
Well, I personally would not want to use a DBMS that requires me to do that for every single comparison operator in every single query I use. I suppose we would have to agree to disagree here.
-- Igor Tandetnik _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

