CREATE OR REPLACE FUNCTION umlaut_flatten(TEXT) RETURNS TEXT AS $$
SELECT translate(lower($1),'āīăūēəőļņűşıąßàáâãäåæçćèéęêëìíîïłñńòóôõöøùúûüýÿšśžżź', 'aiaueeolnuslassaaaaaaacceeeeeiiiilnnoooooouuuuyysszzz');
$$ LANGUAGE SQL IMMUTABLE RETURNS NULL ON NULL INPUT;

