fuzzystrmatch extension
The fuzzystrmatch module provides several functions to determine similarities and distance between strings.
CREATE EXTENSION fuzzystrmatch;
SELECT levenshtein('Yugabyte', 'yugabyte'), metaphone('yugabyte', 8);
levenshtein | metaphone
-------------+-----------
2 | YKBT
(1 row)