本文介绍了更改数据库排序规则,PostgreSQL中的Ctype的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何将排序规则cType从 en_US.UTF-8
how do I change Collation, cType to - en_IN from en_US.UTF-8
List of databases Name | Owner | Encoding | Collation | Ctype | Access privileges -----------+----------+----------+-------------+-------------+----------------------- postgres | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | template0 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres : postgres=CTc/postgres template1 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres : postgres=CTc/postgres我当前的postgresversion为8.4 ive使用
my current postgresversion is 8.4 ive installed it using
sudo apt-get install postgresql-8.4 postgresql-contrib-8.4在我的Ubuntu服务器ec2中做到这一点
im doing this in my ubuntu amazon server ec2
推荐答案我的建议:
参加pg_dumpall
take a pg_dumpall
重新初始化数据库集群,确保语言环境信息正确
re-initialize the db cluster, making sure the locale information is correct
还原转储。
我发现有时可能需要创建一个带有template template0的数据库(-T template0 from bash或使用来自psql的TEMPLATE template0 来使用非init-db语言环境。
I have found that sometimes it is possible that one may have to create a db with template template0 (-T template0 from bash or WITH TEMPLATE template0 from psql) to use a non-init-db locale.
更多推荐
更改数据库排序规则,PostgreSQL中的Ctype
发布评论