4
My database is with locale en_US.UTF-8, I need to change it to pt_BR.UTF-8 for the purposes of ordering consultations.
How can I do that only with phpPgAdmin?
4
My database is with locale en_US.UTF-8, I need to change it to pt_BR.UTF-8 for the purposes of ordering consultations.
How can I do that only with phpPgAdmin?
4
To change you will have to:
Make a logical backup of your current base, maybe you have this option in phpPgAdmin, but unknown, via command line would be something like:
$ pg_dump -d nome_da_base -f nome_da_base.sql
Delete your current base:
DROP DATABASE nome_da_base;
Recreate it using the template0 and the locale correct:
CREATE DATABASE nome_da_base
    TEMPLATE=template0
    LC_CTYPE="pt_BR.UTF-8"
    LC_COLLATE="pt_BR.UTF-8";
Restore:
$ psql -d nome_da_base -f nome_da_base.sql
If your bank is too big this process might be a little slow, in which case it would be better to use a binary backup (recommend -Fc, or -Fd to use parallelism) and restore with the pg_restore using parallelism.
Browser other questions tagged database postgresql
You are not signed in. Login or sign up in order to post.