Parameter · Client Connection Defaults / Locale and Formatting
lc_numeric
Sets the locale for formatting numbers. An empty string means use the operating system setting.
- Default:
C - Type: string
- Applies: Session (any user)
In plain words
Decides which characters to_char uses for thousands groups and the decimal point. It does not change how numbers are normally printed or parsed: SELECT 1234.5 always shows 1234.5.
For DBAs and operators
Only template patterns G (group separator) and D (decimal point) in to_char/to_number use it. Literal , and . in a pattern are always printed as-is. Ordinary numeric I/O, COPY and casts are locale-independent, so data never becomes ambiguous.
Empty means inherit from the server environment; initdb writes the OS locale. The locale must exist on the server OS. A common pitfall: reports built with to_char(x, '9G999D99') look different on a test server with a different locale. Pin the setting per role or database (ALTER DATABASE … SET lc_numeric = …) if reports must match.
How to change it
Any user can change it for their session with SET.