无效的语言环境名称 Chinese (Simplified)_People''s Republic of China.936

2020-12-25 06:29

阅读:1151

标签:upm   color   enc   文件中   message   http   str   att   itdb   

pg9.6 或 pg10 在Windows Server 2012 R2 DataCenter 中使用。

使用如下建库语句,建库时

CREATE DATABASE upmap 
WITH
OWNER = postgres
ENCODING = ‘UTF8‘
LC_COLLATE = ‘Chinese (Simplified)_People‘‘s Republic of China.936‘
LC_CTYPE = ‘Chinese (Simplified)_People‘‘s Republic of China.936‘
TABLESPACE = up_map
CONNECTION LIMIT = -1;

出现如下错误:(无效的语言环境名称 Chinese (Simplified)_People‘‘s Republic of China.936)

  技术图片

 

 

解决办法:

  1、查看  安装目录的\PostgreSQL\9.6\data  文件夹中的  postgresql.conf  文件中

  找到如下配置:

# These settings are initialized by initdb, but they can be changed.
lc_messages = ‘Chinese (Simplified)_China.936‘            # locale for system error message
                    # strings
lc_monetary = ‘Chinese (Simplified)_China.936‘            # locale for monetary formatting
lc_numeric = ‘Chinese (Simplified)_China.936‘            # locale for number formatting
lc_time = ‘Chinese (Simplified)_China.936‘                # locale for time formatting

 

  2、修改建库语句中的语言指定   

  将

    Chinese (Simplified)_People‘‘s Republic of China.936

  修改为

    Chinese (Simplified)_China.936
CREATE DATABASE upmap    
WITH
OWNER = postgres
ENCODING = ‘UTF8‘
LC_COLLATE = ‘Chinese (Simplified)_China.936‘
LC_CTYPE = ‘Chinese (Simplified)_China.936‘
TABLESPACE = up_map
CONNECTION LIMIT = -1;

  

无效的语言环境名称 Chinese (Simplified)_People''s Republic of China.936

标签:upm   color   enc   文件中   message   http   str   att   itdb   

原文地址:https://www.cnblogs.com/MobiusMap/p/13207888.html


评论


亲,登录后才可以留言!