From: | Jan Urbański <wulczer(at)wulczer(dot)org> |
---|---|
To: | Alexander Korotkov <aekorotkov(at)gmail(dot)com> |
Cc: | Postgres - Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: wildcard search support for pg_trgm |
Date: | 2011-01-30 21:52:27 |
Message-ID: | 4D45DD9B.5090003@wulczer.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Kevin Grittner | 2011-01-30 22:01:56 | Re: SSI patch version 14 |
Previous Message | Jeff Davis | 2011-01-30 21:33:07 | Re: WIP: RangeTypes |