Postgresql postgres-无法创建排序规则
我有一个Postgres9.2数据库运行在DebianWheezy上。如果我在pgadmin中执行:Postgresql postgres-无法创建排序规则,postgresql,debian,locale,collation,Postgresql,Debian,Locale,Collation,我有一个Postgres9.2数据库运行在DebianWheezy上。如果我在pgadmin中执行: CREATE COLLATION en ( LOCALE = 'en_US.UTF-8') 我收到以下错误消息 ERROR: could not create locale "en_US.UTF-8": Datei oder Verzeichnis nicht gefunden DETAIL: The operating system could not find any locale d
CREATE COLLATION en ( LOCALE = 'en_US.UTF-8')
我收到以下错误消息
ERROR: could not create locale "en_US.UTF-8": Datei oder Verzeichnis nicht gefunden
DETAIL: The operating system could not find any locale data for the locale name "en_US.UTF-8".
我已经在该计算机上配置了本地机,并重新启动了postgres:
locale-gen en_US.UTF-8
Generating locales (this might take a while)...
de_DE.UTF-8... done
en_US.UTF-8... done
fr_FR.UTF-8... done
tr_TR.UTF-8... done
但错误仍然存在。还有什么我需要检查的吗 您的基本问题是PostgreSQL使用操作系统区域设置和排序顺序 在Debian上,您需要运行以下操作来添加区域设置:
dpkg-reconfigure locales
然后,一旦en_US.UTF-8出现,它就应该可以工作。您可能需要重新启动postgres服务