無效的語言環境名稱 Chinese (Simplified)_People''s Republic of China.936


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;

  


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM