In Oracle and PostgreSQL, the SOUNDEX function returns a phonetic representation of a specified string.
Note that before you can use SOUNDEX in PostgreSQL, you need to enable the fuzzystrmatch extension.
Oracle:
SELECT SOUNDEX('Orange') FROM dual; /* O652 */
PostgreSQL:
-- Enable the extension (execute once) CREATE EXTENSION fuzzystrmatch; SELECT SOUNDEX('Orange'); /* O652 */
For more information, see Oracle to PostgreSQL Migration.