Re: wildcard search support for pg_trgm

Поиск
Список
Период
Сортировка
От Jan Urbański
Тема Re: wildcard search support for pg_trgm
Дата
Msg-id 4D45DD9B.5090003@wulczer.org
обсуждение исходный текст
Ответ на Re: wildcard search support for pg_trgm  (Alexander Korotkov <aekorotkov@gmail.com>)
Ответы Re: wildcard search support for pg_trgm  (Alexander Korotkov <aekorotkov@gmail.com>)
Список pgsql-hackers
On 29/01/11 13:07, Alexander Korotkov wrote:
> Hello!

Hi!

> 
> New version of patch is in the attachment. Some comments was added in
> this version. Likely these comments need significant correction because
> of my english.

Ooh, ok, the comments now helped me understand what's exactly going on
in there.

I played with it a bit more and the idea of using trigrams to do LIKE
searches is quite clever.

Unfortunately, I think there's a problem with case insensitive queries:

create table test(t text);
insert into test values ('abcdef');
create index trgm_idx_gin on test using gin (t gin_trgm_ops);
set enable_seqscan to off; -- force index usage
select * from test where t ilike '%BCD%';
-- no results!
set enable_seqscan to on; -- do not use the index
select * from test where t ilike '%BCD%';
-- the row is returned

I saw that the code tries to handle ILIKE searches, but apparently it's
failing somewhere.

I'm sorry but I'm leaving on vacation for the next week and won't be
able to continue reviewing your patch, I'll unset myself as its
reviewer, and in the meantime I hope someone else will pick it up, as
the functionality seems very interesting.

Cheers,
Jan


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

Предыдущее
От: Jeff Davis
Дата:
Сообщение: Re: WIP: RangeTypes
Следующее
От: "Kevin Grittner"
Дата:
Сообщение: Re: SSI patch version 14