fuzzystrmatch
determine similarities and distance between strings
fuzzystrmatch : determine similarities and distance between strings
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 2380 | fuzzystrmatch | fuzzystrmatch | 1.2 |
FTS | PostgreSQL | C |
| Attribute | Has Binary | Has Library | Need Load | Has DDL | Relocatable | Trusted |
|---|---|---|---|---|---|---|
| --s-dt- | No | Yes | No | Yes | no | yes |
| Relationships | |
|---|---|
| Need By | postgis_tiger_geocoder |
| See Also | pg_trgm pg_similarity smlar pgpcre re2 pg_bigm biscuit unaccent citext |
Packages
| PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|
| 1.2 | 1.2 | 1.2 | 1.2 | 1.2 |
This is a built-in contrib extension ship with the PostgreSQL kernel
Install
Create this extension with:
Usage
fuzzystrmatch: Determine similarities and distance between strings
The fuzzystrmatch module provides functions to determine similarities and distance between strings.
Soundex
Converts a string to its Soundex code (useful for matching similar-sounding names):
The difference function returns 0–4, where 4 means most similar.
Daitch-Mokotoff Soundex
Returns a set of Daitch-Mokotoff soundex codes (better for non-English names):
Supports indexing with GIN:
Levenshtein Distance
Computes edit distance between two strings (insertions, deletions, substitutions):
Metaphone
Returns a metaphone code for a string:
Double Metaphone
Returns primary and alternate codes (handles more name variations):