db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick Hillegas <Richard.Hille...@Sun.COM>
Subject Re: territory-based collations and optimizations for the LIKE operator
Date Tue, 26 Aug 2008 13:56:19 GMT
Knut Anders Hatlen wrote:
> Daniel John Debrunner <djd@apache.org> writes:
>
>   
>> Rick Hillegas wrote:
>>
>>     
>>>> Rick, why do you believe that Derby will return a subset of the
>>>> rows, it doesn't seem to follow from any of the other posts in this
>>>> thread?
>>>>
>>>> Dan.
>>>>         
>>> Hi Dan,
>>>
>>> Thanks for helping me puzzle through this. Consider the example we
>>> are working with, a collation in which 'z' = 'xy'. What happens with
>>> the following insert:
>>>
>>>  insert into T(A) values ( 'zcb' ), ( 'xycb' )
>>>
>>> followed by this query:
>>>
>>>  select * from T where T.A like 'xy_b'
>>>
>>> If I  understand what is being said, it seems like the following
>>> happens: the ANSI rules return both rows but Derby returns only (
>>> xycb' )
>>>       
>> I thought Derby was following the ANSI rules for LIKE. From memory,
>> LIKE operators on a character by character basis, not collation
>> elements.
>>     
>
> Yes, I remember that we discussed this and came to that conclusion. See
> ISO/IEC 9075-2:2003 (E), Section 8.5 <like predicate>, general rule 3c.
>
>   
Hi Dan and Knut,

Thanks for that pointer. I'm tracking now.

Regards,
-Rick

Mime
View raw message