postgresql_16:9.6.17.5 Double Metaphone
PostgreSQL 16 > Appendixes > Additional Supplied Modules and Extensions > fuzzystrmatch — determine string similarities and distance > Double Metaphone
The Double Metaphone system computes two “sounds like” strings for a given input string — a “primary” and an “alternate”. In most cases they are the same, but for non-English names especially they can be a bit different, depending on pronunciation. These functions compute the primary and alternate codes:
dmetaphone(source text) returns text dmetaphone_alt(source text) returns text
There is no length limit on the input strings.
Example:
test=# SELECT dmetaphone('gumbo');
dmetaphone
------------
KMP
(1 row)