En este video tutorial se muestra cómo solucionar el error de PostgreSQL “Database creation error: new encoding (UTF8)” este error es muy común durante la creación de bases de datos dentro de PostgreSQL, en mi caso el error me sucedió durante la instalación de OdooERP.
Comandos para solucionar el error Database creation error: new encoding (UTF8)
postgres@odoo:~$ psql
psql (9.4.12)
Type "help" for help.
postgres=# UPDATE pg_database SET datistemplate = FALSE WHERE datname = 'template1';
UPDATE 1
postgres=# DROP DATABASE template1;
DROP DATABASE
postgres=# CREATE DATABASE template1 WITH TEMPLATE = template0 ENCODING = 'UNICODE';
CREATE DATABASE
postgres=# UPDATE pg_database SET datistemplate = TRUE WHERE datname = 'template1';
UPDATE 1
postgres=# \c template1
You are now connected to database "template1" as user "postgres".
template1=# VACUUM FREEZE;
VACUUM
template1=# \q
postgres@odoo:~$
Relacionado
4 comentarios sobre “Solución PostgreSQL – Database creation error: new encoding (UTF8) is incompatible with the encoding of the template database”
Hi friends, its enormous post concerning cultureand fully defined, keep it up all the time.
Hi can you give me a hand on it ? I have the same error, but I have no ideia where to type the commands. I am running a MacOs and PgAdmin 4 for the DB. How Can I fix it?
Hi friends, its enormous post concerning cultureand fully defined, keep it up all the time.
Hi can you give me a hand on it ?
I have the same error, but I have no ideia where to type the commands.
I am running a MacOs and PgAdmin 4 for the DB.
How Can I fix it?
Thanks in advance.
Alan
Hi, sure, I use Linux so the commands I ran were in the linux but you can run the same commands on your mac.
Just go into postgres and type the commands in your mac terminal.
Remember make a backup of you DB.
The problem is the coding of your database, you just need to change it to UNICODE.