3

I have a PostgreSQL 8.4 database, installed with Japanese as the main language. I am connecting from an English Windows 7 client using psql.exe. Is there any way to change the UI of the messages shown to me (e.g. the help, column headers from the \l command, etc) to English?

I know that I can set the character encoding using \encoding, but I really want to change the UI language from ja_JP to en_US (or similar).

I can't see anything in the psql documentation. Any ideas?

2
  • In a Linux environment, this is controlled by environment variables on the client. If your OS is generally set to one language, psql should behave the same. Not sure why that doesn't work in your case. Dec 25, 2010 at 10:28
  • Delete or rename the locale folder. See stackoverflow.com/a/56811670/7818237 Aug 19, 2021 at 1:09

2 Answers 2

6

In Windows also, psql only looks at the LC_MESSAGES environment variable. Therefore this works...

set LC_MESSAGES=C
psql.exe
1
  • Powershell version: $env:LC_MESSAGES = 'C'
    – nudls00p
    Mar 30, 2020 at 14:30
0

I ran into the same problems. I tried to set locale properly during PostgreSQL installation, tried to change postgresql.conf but nothing helped to change the language in psql. Found out the UI language of psql.exe is controlled by environment variables in Windows. But set LC_MESSAGES=C modifies only current shell variable and it is saved temporarily, so as soon as you close the shell (or restart PC), your issue is back.

These 4 options change the UI language of psql.exe to English and make sure to keep this setting persistently to avoid returning of the issue:

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .