Add strict_word_similarity to pg_trgm module

Enterprise / PostgreSQL - Teodor Sigaev [sigaev.ru] - 21 March 2018 11:57 EDT

strict_word_similarity is similar to existing word_similarity function but it takes into account word boundaries to compute similarity.

Author: Alexander Korotkov Review by: David Steele, Liudmila Mantrova, me Discussion: https://www.postgresql.org/message-id/flat/CY4PR17MB13207ED8310F847CF117EED0D85A0@CY4PR17MB1320.namprd17.prod.outlook.com

be8a7a6866 Add strict_word_similarity to pg_trgm module
contrib/pg_trgm/Makefile | 5 +-
contrib/pg_trgm/expected/pg_strict_word_trgm.out | 1025 ++++++++++++++++++++++
contrib/pg_trgm/pg_trgm--1.3--1.4.sql | 68 ++
contrib/pg_trgm/pg_trgm.control | 2 +-
contrib/pg_trgm/sql/pg_strict_word_trgm.sql | 42 +
contrib/pg_trgm/trgm.h | 21 +-
contrib/pg_trgm/trgm_gin.c | 9 +-
contrib/pg_trgm/trgm_gist.c | 14 +-
contrib/pg_trgm/trgm_op.c | 248 +++++-
doc/src/sgml/pgtrgm.sgml | 88 +-
10 files changed, 1461 insertions(+), 61 deletions(-)

Upstream: git.postgresql.org


  • Share