fuzzystrmatch
determine similarities and distance between strings
Overview
| Package | Version | Category | License | Language |
|---|---|---|---|---|
fuzzystrmatch | 1.2 | FTS | PostgreSQL | C |
| ID | Extension | Bin | Lib | Load | Create | Trust | Reloc | Schema |
|---|---|---|---|---|---|---|---|---|
| 2380 | fuzzystrmatch | No | Yes | No | Yes | Yes | No | - |
| Related | pg_trgm pg_similarity smlar pgpcre re2 pg_bigm biscuit unaccent citext |
|---|---|
| Depended By | postgis_tiger_geocoder |
Version
| PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|
| 1.2 | 1.2 | 1.2 | 1.2 | 1.2 |
Install
Note: This is a built-in contrib extension of PostgreSQL
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):
Was this page helpful?
Thanks—your feedback helps us improve this page.
What got in the way? (optional)