Re: [HACKERS] LIKE fixed(?) for non-ASCII collation orders

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: [HACKERS] LIKE fixed(?) for non-ASCII collation orders
Дата
Msg-id 199912311850.NAA25467@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] LIKE fixed(?) for non-ASCII collation orders  (Andreas Degert <ad@papyrus-gmbh.de>)
Список pgsql-hackers
Yes, we always still match the LIKE.  The additional comparisons just
make the number of rows smaller.


> Tom Lane <tgl@sss.pgh.pa.us> writes:
> 
> > I have just committed what I hope is the final solution for the problem
> > of LIKE index optimization in non-ASCII locales.  indxpath.c now
> > generates both a lower and upper indexqual in all locales.  For example,
> >     x LIKE 'foo%t'
> > will create indexqual conditions
> >     x >= 'foo' AND x < 'fop'
> > The "<" condition is omitted only if the code is unable to produce a
> > string greater than the pattern's constant prefix.
> 
> the .. >= .. < .. condition will result in addtional matches, like 'fo ot',
> so you still have to check with LIKE. I'm using such an expression
> (without the additional LIKE) in an application, and it seems to match 
> at least everything that LIKE would match too (my users would have
> complained about missing matches, but i never did a formal test or
> evaluation).
> 
> ************
> 


--  Bruce Momjian                        |  http://www.op.net/~candle maillist@candle.pha.pa.us            |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Mount
Дата:
Сообщение: Re: [HACKERS] Happy New Year!
Следующее
От: wieck@debis.com (Jan Wieck)
Дата:
Сообщение: Re: [HACKERS] Happy New Year!