Parameter · Client Connection Defaults / Locale and Formatting
lc_time
Sets the locale for formatting date and time values. An empty string means use the operating system setting.
- Default:
C - Type: string
- Applies: Session (any user)
In plain words
Lets to_char write day and month names in another language, for example Freitag, 07 März 2025. It does not change the normal date output, which is controlled by DateStyle.
For DBAs and operators
Only patterns with the TM (translation mode) prefix use it: TMDay, TMMonth, TMMon, TMDy. Without TM, names are always English. to_timestamp/to_date also accept localized names when the pattern uses TM.
Empty means inherit from the environment; initdb writes the OS locale and also derives the default DateStyle field order from it. The OS locale must be installed (locale -a). to_char is not immutable (its output depends on settings such as this one), so it cannot be used in index expressions.
How to change it
Any user can change it for their session with SET.