我有一个使用默认字符集SQL_ASCII设置的数据库.我想将它切换到UNICODE.有一个简单的方法吗?
我正在尝试更改client_encoding我正在运行的PostgreSQL数据库的配置变量的默认值.我想要它UTF8,但目前它正在设置LATIN1.
数据库已设置为使用UTF8编码:
application_database=# \l
List of databases
Name | Owner | Encoding | Collate | Ctype | Access privileges
----------------------+----------+----------+-------------+-------------+--------------------------------------
postgres | postgres | LATIN1 | en_US | en_US |
application_database | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | postgres=CTc/postgres +
| | | | | application_database=Tc/postgres
template0 | postgres | LATIN1 | en_US | en_US | =c/postgres +
| | | | | postgres=CTc/postgres
template1 | postgres | LATIN1 | en_US | …Run Code Online (Sandbox Code Playgroud)