将PostgreSQL server错误消息的语言更改为英语
我的MS Windows系统是法语版本。我最近安装了PostgreSQL server。虽然pgAdmin是英文的,但我在PostgreSQL psql命令行中收到法文消息。您需要命名将PostgreSQL server错误消息的语言更改为英语,postgresql,Postgresql,我的MS Windows系统是法语版本。我最近安装了PostgreSQL server。虽然pgAdmin是英文的,但我在PostgreSQL psql命令行中收到法文消息。您需要命名LC\u消息,并将其设置为English 如果您有访问$datadir\postgresql.conf的权限,请将lc\u消息参数更改为English\u-United.1252。您需要重新加载配置(重新启动服务器) 我的配置是: # These settings are initialized by initdb
LC\u消息
,并将其设置为English
如果您有访问
$datadir\postgresql.conf
的权限,请将lc\u消息
参数更改为English\u-United.1252
。您需要重新加载配置(重新启动服务器)
我的配置是:
# These settings are initialized by initdb, but they can be changed.
lc_messages = 'English_United States.1252' # locale for system error message
# strings
lc_monetary = 'English_United States.1252' # locale for monetary formatting
lc_numeric = 'English_United States.1252' # locale for number formatting
lc_time = 'English_United States.1252' # locale for time formatting
# default configuration for text search
default_text_search_config = 'pg_catalog.english'
您可以定义
LC_MESSAGES
MS Windows环境变量或配置postgresql.conf
文件。如果将它们都设置为不同的值,postgresql.conf
。查看docu和。这是对我有效的解决方案,谢谢。另一篇文章中提到的“环境变量”不起作用。如果其他人想知道:postgresql.conf
文件位于C:\Program Files\postgresql\9.5\data\postgresql.conf
下。在Windows上,您必须重新启动postgresql服务才能使更改生效。在中的其他服务中找到它,右键单击它并选择restart
。等待它重新启动并检查结果。有没有办法通过我的应用程序的设置来控制应用程序中的这些消息?我正在使用Delphi和FireDAC数据访问组件。