Skip to content

Latest commit

 

History

History
21 lines (17 loc) · 512 Bytes

compute-the-levenshtein-distance-of-two-strings.md

File metadata and controls

21 lines (17 loc) · 512 Bytes

Compute The Levenshtein Distance Of Two Strings

PostgreSQL has a built-in function for computing the Levenshtein distance between two strings.

> select levenshtein('hello', 'world');
 levenshtein
-------------
           4

> select levenshtein('function', 'funtcion');
 levenshtein
-------------
           2

Check out the fuzzystrmatch module for more details.