so it looks to me, like you are trying to use wrong tool for the job. Why not just normalize names to #3 ?
pgsql-general by date:
Соглашаюсь с условиями обработки персональных данных