Postgres上的C语言和Posix语言环境有什么区别? [英] What is the difference between C and Posix locales on Postgres?

查看:137
本文介绍了Postgres上的C语言和Posix语言环境有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道Postgres上的数据库语言环境负责适当的民族字符顺序,适当的下/上壳体等.

I know that database locales on Postgres are responsible for proper order of national characters, proper lower/upper-casing etc.

但是为什么有两种与语言无关的语言环境:posixc?它们之间有什么区别吗?还是只是一个带有两个不同名称的中性语言环境?

But why there are two language-neutral locales: posix and c? Is there any difference between them or is it just one neutral locale with two different names?

更新正如Magnus Hagander在回答中指出的那样,POSIX和C语言环境是具有不同名称的相同语言环境(无论Postgres是安装在POSIX还是Windows系统上).我不知道如何确认此信息-在哪里可以找到文档的适当部分?

UPDATE As Magnus Hagander states in his answer, POSIX and C locales are the same locale with different names (no matter if Postgres is installed on POSIX or Windows System). I don't know how to confirm this information - where to look for proper section of documentation?

Magnus的解释似乎很明智,但同时有两个名称可以选择相同的语言环境,这很奇怪. 这是什么目的-只是使人困惑?

Magnus's explanation seems sensible, but it is strange at the same time that there are two names for the same locale to choose from. What is the purpose of this - only to make confusion?

推荐答案

请注意,PostgreSQL仅使用操作系统语言环境,而没有其自己的语言环境定义.如果您的系统符合POSIX,则C和POSIX的语言环境完全相同: http: //www.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap07.html (请参见7.2下的第一句话).

Note that PostgreSQL just uses the operating system locale, and doesn't have it's own definition of locales. If your system is POSIX compliant, C and POSIX will be the exact same locale: http://www.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap07.html (see the first sentence under 7.2).

这篇关于Postgres上的C语言和Posix语言环境有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆