更改数据库排序规则,PostgreSQL中的Ctype

编程入门 行业动态 更新时间:2024-10-23 03:33:01
本文介绍了更改数据库排序规则,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

    本文发布于:2023-10-16 00:26:50,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1495931.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:规则   数据库   Ctype   PostgreSQL

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!