> On Aug 16, 2017, at 4:55 PM, Richard Hipp <d...@sqlite.org> wrote:
> 
> Remember:  COLLATE binds more tightly than ==.  So
> 
>     'xyz' = 'XYZ' COLLATE nocase
> 
> gets parsed out as
> 
>    'xyz' = ('XYZ' COLLATE nocase)
> 
> And that expression has a different meaning from your
> 
>   ('xyz' = 'XYZ') COLLATE nocase

Oh, so collation is actually an attribute of a string value, that gets applied 
during comparisons involving that value? That’s very different from my mental 
model!

In that case, what is the meaning of
        ('foo' COLLATE binary) = ('FOO' COLLATE nocase)
i.e. which of the two competing collations does the = operator decide to use?

And is the collation attribute passed around with the string value, through 
intervening expressions? I.e. is this expression true?
        'FOO' = ifnull(null, 'foo' COLLATE nocase)

—Jens
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to