wrote by Rafael Marangoni, from Suporte Linux team.
This article explains how to change the default PostgreSQL Locale. Be careful, because we're considering that you do not have data on postgresql instance.
First, we need to stop the postgres service (if was not already stopped):
Then we need to remove all data files from postgresql data dir. On RedHat based, that's the dir:
rm -rf /var/lib/pgsql/data/*
Now we change to postgres user:
Creating the initial data, selecting the Locale:
initdb --locale=C /var/lib/pgsql/data
initdb --locale=pt_BR.UTF-8 /var/lib/pgsql/data
or your locale
Then, we start postgres service: