I've posted a new attempt at ripping those ECPG setlocales() out on the other thread that had the earlier version and discussion: https://www.postgresql.org/message-id/CA%2BhUKG%2BYv%2Bps%3DnS2T8SS1UDU%3DiySHSr4sGHYiYGkPTpZx6Ooww%40mail.gmail.com
pgsql-hackers by date:
Соглашаюсь с условиями обработки персональных данных