Re: 7.3 no longer using indexes for LIKE queries
От | Jean-Luc Lachance |
---|---|
Тема | Re: 7.3 no longer using indexes for LIKE queries |
Дата | |
Msg-id | 3DEE6495.16E9C4EE@nsd.ca обсуждение исходный текст |
Ответ на | Re: 7.3 no longer using indexes for LIKE queries (Matthew Gabeler-Lee <mgabelerlee@zycos.com>) |
Список | pgsql-general |
C_COLLATE is what is involved with accents. How would you sort: CÔTE CÔTES COTÉ COTÉS COTE You can't fold accented character into non accented because unique index would barf on CÔTE if COTE is already in. You still need to know if 'CÔTE' < 'COTÉ' or not when you do a sort. Collating in french, for example, is not a byte to byte compare. If you compare words based only on their binary representation, the sort will be wrong CRIME before CÔTE. JLL Matthew Gabeler-Lee wrote: > 4) accent folding; I'm not entirely sure like is supposed to do this. I'm > going to pretend for the rest of this that the like operator shouldn't fold > accented characters. > > [...] > > It seems to me that the most common place one wants to think about this is > in full text searching and the like. In this case, maybe I'm daft, but > perhaps the thing to do is to create a functional index, where the function > being indexed strips all the accents off characters. > > Does the SQL spec have anything to say on accent folding in comparisons?
В списке pgsql-general по дате отправления: