DB Internals AtlasPostgreSQL 18.6 Home About

Parameter · Client Connection Defaults / Locale and Formatting

lc_messages

Sets the language in which messages are displayed. An empty string means use the operating system setting.

  • Default: '' (empty)
  • Type: string
  • Applies: Session (superuser)

In plain words

Chooses the language PostgreSQL uses for its messages, for example German or French instead of English. It affects both what clients see and what goes into the server log.

Many teams keep it at C or English so logs stay searchable and log analyzers work.

For DBAs and operators

Empty (boot default) means "inherit from the server's environment"; initdb usually writes the OS locale into postgresql.conf. Translations exist only if the server was built with NLS and the message catalogs (postgres-18.mo) and the OS locale are installed; otherwise messages stay in English and the setting has no visible effect. Only superusers (or roles granted SET) can change it, because it changes what goes into the server log.

The severity word is translated too: FEHLER, ERREUR. Log parsers such as pgBadger, alerting rules that grep for ERROR:, and support engineers reading logs all expect English. Recommended: lc_messages = 'C' (or en_US.UTF-8) in postgresql.conf; individual applications can still show localized text by mapping SQLSTATE codes, which never change with the language.

Search for errors by SQLSTATE (%e in log_line_prefix, or VERBOSITY verbose in psql) to be language-independent.

How to change it

A superuser (or a role granted SET) can change it per session with SET.

See it in context

Logger (logging collector)

Related parameters

log_line_prefix client_min_messages lc_monetary

All Client Connection Defaults parameters