mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
Add word_similarity to pg_trgm contrib module.
Patch introduces a concept of similarity over string and just a word from another string. Version of extension is not changed because 1.2 was already introduced in 9.6 release cycle, so, there wasn't a public version. Author: Alexander Korotkov, Artur Zakirov
This commit is contained in:
@ -13,7 +13,7 @@ select similarity('wow',' WOW ');
|
||||
|
||||
select similarity('---', '####---');
|
||||
|
||||
CREATE TABLE test_trgm(t text);
|
||||
CREATE TABLE test_trgm(t text COLLATE "C");
|
||||
|
||||
\copy test_trgm from 'data/trgm.data'
|
||||
|
||||
@ -40,7 +40,7 @@ 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;
|
||||
|
||||
create table test2(t text);
|
||||
create table test2(t text COLLATE "C");
|
||||
insert into test2 values ('abcdef');
|
||||
insert into test2 values ('quark');
|
||||
insert into test2 values (' z foo bar');
|
||||
|
Reference in New Issue
Block a user