gpt4 book ai didi

postgresql - postgres - 无法创建排序规则

转载 作者:行者123 更新时间:2023-11-29 14:00:47 24 4
gpt4 key购买 nike

我有一个在 debian wheezy 上运行的 postgres 9.2 数据库。如果我在 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 data for the locale name "en_US.UTF-8".

我已经在那台机器上配置了 locals 并重新启动了 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,它就应该可以工作了。

关于postgresql - postgres - 无法创建排序规则,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19388178/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com