mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
Add GIN support for pg_trgm. From Guillaume Smet <guillaume.smet@gmail.com>
with minor editorization by me.
This commit is contained in:
@ -28,3 +28,11 @@ select t,similarity(t,'qwertyu0988') as sml from test_trgm where t % 'qwertyu098
|
||||
select t,similarity(t,'gwertyu0988') as sml from test_trgm where t % 'gwertyu0988' order by sml desc, t;
|
||||
select t,similarity(t,'gwertyu1988') as sml from test_trgm where t % 'gwertyu1988' order by sml desc, t;
|
||||
|
||||
drop index trgm_idx;
|
||||
create index trgm_idx on test_trgm using gin (t gin_trgm_ops);
|
||||
set enable_seqscan=off;
|
||||
|
||||
select t,similarity(t,'qwertyu0988') as sml from test_trgm where t % 'qwertyu0988' order by sml desc, t;
|
||||
select t,similarity(t,'gwertyu0988') as sml from test_trgm where t % 'gwertyu0988' order by sml desc, t;
|
||||
select t,similarity(t,'gwertyu1988') as sml from test_trgm where t % 'gwertyu1988' order by sml desc, t;
|
||||
|
||||
|
Reference in New Issue
Block a user