linux - 在 arch 中将 postgresql 语言设置为英语

标签 linux postgresql locale

如何在 arch linux 中将 postgresql 语言更改为英语?我是波兰语,我的系统语言也是波兰语,但我希望 postgres 输出英文。实际上我有:

postgres=# \d
                      Lista relacji
 Schemat |         Nazwa         |    Typ    | Właściciel 
---------+-----------------------+-----------+------------
 public  | tablename             | tabela    | stanek

想要拥有

postgres=# \d
                      Relations list
 Schema  |         Name          |    Type   | Owner 
---------+-----------------------+-----------+------------
 public  | tablename             | table     | stanek

最佳答案

要单独更改 Linux 应用程序语言,请在执行之前将环境变量 LANGUAGE 设置为所需的语言环境

export LANGUAGE=en_US.UTF-8
psql ...

或者只是

LANGUAGE=en_US.UTF-8 psql ...

要永久设置语言,您可以在系统启动时为命令创建别名。添加命令

alias psql='LANGUAGE=en_US.UTF-8 psql'

到您的~/.profile~/.bashrc 文件。

关于linux - 在 arch 中将 postgresql 语言设置为英语,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35608028/

相关文章:

linux - 如何检查 Linux 机器 (Ubuntu) 中的 DB2 安装

postgresql - 在 Postgresql 中插入自引用记录

PostgreSQL - 在 TYPE 的元素上创建索引

Java 区域设置到国家/地区代码 (ISO 3166)

linux - 当 redis 和 elasticsearch 等服务被多个其他服务使用时,您是否应该为它们创建单独的 docker 容器?

php - 重写后无法访问 $_GET

C++清除输入缓冲区(最后没有换行符)

postgresql - 使用 NHibernate 映射复合键时出现问题(列已添加)

excel - 阿拉伯字符在 Excel VBA 代码中不显示

ubuntu - 在 Linux 中使用 Boost 1.50 语言环境编译的 ICU 问题