Change language of the PostgreSQL server error messages to English

前端 未结 3 939
终归单人心
终归单人心 2020-12-19 06:14

My MS Windows system is French version. I\'ve recently installed PostgreSQL server. Although pgAdmin is in English I get French messages in the PostgreSQL psql command line.

相关标签:
3条回答
  • 2020-12-19 06:26

    You need to define an environment variable named LC_MESSAGESand set that to English

    0 讨论(0)
  • 2020-12-19 06:34

    If you have permissions for access to $datadir\postgresql.conf change lc_messages parameter to English_United States.1252. You need to reload configuration (do restart of the server).

    My config is:

    # 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'
    
    0 讨论(0)
  • 2020-12-19 06:46

    You can define LC_MESSAGES MS Windows environment variable or configure your postgresql.conf file. If they will be set both for different values, postgresql.conf will take the place. Look into docu here and here.

    0 讨论(0)
提交回复
热议问题