gpt4 book ai didi

ruby-on-rails-3.2 - 迁移 postgresql lc_ctype 集群值不匹配

转载 作者:行者123 更新时间:2023-12-04 07:42:27 25 4
gpt4 key购买 nike

必须在 Homebrew 框架内迁移 postgresql 集群(按照此处的说明), https://gist.github.com/cjolly/2870054命令迁移失败

pg_upgrade -d /usr/local/var/postgres-9.0.4/ -D /usr/local/var/postgres -b /usr/local/Cellar/postgresql/9.0.4/bin -B /usr/local/Cellar/postgresql/9.2.4/bin

有错误

lc_ctype cluster values do not match: old "UTF-8", new "C"

知道如何克服这个问题吗?

或者,我愿意继续使用 9.0.4 版本,除了我愚蠢地删除了原始的 Cellar 目录,让 Homebrew 程序进行清理(我可以确认它是有效且危险的)并且没有任何配方适用于该版本。我确实有 tarball 并设法安装了它,但它在 Homebrew 软件下并且担心以后会有更多麻烦。

我已经将压缩包生成的/usr/local/pgsql/移动到/usr/local/Cellar/postgresql/

这里有什么错误的步骤吗?

最佳答案

通过在初始化新数据库时直接指定 --lc-ctype 解决了这个问题:

initdb /usr/local/var/postgres9.4 -E utf8 --lc-ctype=UTF-8

关于ruby-on-rails-3.2 - 迁移 postgresql lc_ctype 集群值不匹配,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17003123/

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