On 2016/02/12 6:38 PM, Michele Pradella wrote:
> Already solved with UNION of SELECT
>

It isn't solved, it is circumvented by trial and error without 
understanding why.

I'm sure that works ok for you in this case, but the point is if you do 
study those documents a bit more, you may grasp the reason too, and 
perhaps make much better/faster queries in future without spending hours 
on trial and error. Save yourself a lot of time, we think.



> Il 12/02/2016 17.03, Richard Hipp ha scritto:
>> ...//so that it is easier to understand. Perhaps a table that shows the
>> various combinations of COLLATE and PRAGMA case_sensitive_like work
>> together.  I dunno.  I'll take the action item to revisit the
>> documentation and try to improve it.

@Dr.Hipp: Would it be possible / difficult to perhaps improve the like 
algorithm and pragma case-insensitive_like to take 3 values, such that 0 
= OFF, 1 = ON and 2 = AS PER COLUMN DEF?

I realize the like function maybe doesn't know which column, nor is the 
like operation guaranteed to happen on a column. Maybe there is another 
way? Perhaps only from inside the query planner when making plan 
decisions? (Currently it compares the ci-ness during planning to decide 
on best index to use, if I'm not mistaken).

What I have done is simply added a custom LIKE function that takes a 
second parameter for case sensitivity to avoid pragma-juggling - but by 
this, the query planner is none the wiser

I find myself sometimes needing the above, though not often enough to 
warrant requesting the feature, but it seems now maybe others have the 
need too.

Thanks,
Ryan

Reply via email to