使centos支持中文
psql
psql: error: connection to server on socket "/tmp/.s.PGSQL.5432" failed: FATAL: database locale is incompatible with operating system
DETAIL: The database was initialized with LC_COLLATE "zh_CN.UTF-8", which is not recognized by setlocale().
HINT: Recreate the database with another locale or install the missing locale.
dnf install glibc-langpack-zh.x86_64 #安装中文支持
echo LANG=zh_CN.UTF-8 > /etc/locale.conf #修改系统的字符集
source /etc/locale.conf #使立即生效
[postgres@mmsql01 ~]$ psql
psql (14.10)
Type "help" for help.
postgres=#