Re: Partial match in GIN

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Partial match in GIN
Дата
Msg-id 20080408194900.GQ9062@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: Partial match in GIN  (Heikki Linnakangas <heikki@enterprisedb.com>)
Ответы Re: Partial match in GIN  (Heikki Linnakangas <heikki@enterprisedb.com>)
Список pgsql-patches
Heikki Linnakangas wrote:
> Alvaro Herrera wrote:
>> Heikki Linnakangas wrote:

>>> You could satisfy '%foo%' using a regular and a reverse B-tree index,
>>>  and a bitmap AND. Which is interestingly similar to the way you
>>> proposed  to use a TIDBitmap within GIN.
>>
>> Huh, can you?  I can see doing "col LIKE 'foo%' OR reverse(col) LIKE
>> reverse('%foo')" with two btree indexes, but not a true %foo% ...
>
> That should be AND, not OR..
>
> Hmm. It is the same as far as I can see. Am I missing something?

Well, LIKE %foo% is supposed to match foo unanchored, but with a btree
(or two btrees) you can only get 'foo' anchored to either end of the
string (or both).

--
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

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

Предыдущее
От: Gregory Stark
Дата:
Сообщение: EXPLAIN progress info
Следующее
От: David Fetter
Дата:
Сообщение: Fix \dT enum in psql