select open change scope Open full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

CONFIGURATION / PRESET OPTIONS

Reports the locale that determines character classifications.

Type
string
Context
internal
Measured default
C
Unit
Metadata snapshot
15

Definition PG 15 manual

Reports the locale that determines character classifications. See Section 24.1 for more information. This value is determined when a database is created. Ordinarily this will be the same as lc_collate, but for special applications it might be set differently.

Measured default history
Version intervalDefault
9.0 – 15C
Analysis & operational context

Authored guidance from the GUC source snapshot; the version-specific manual above is the definition reference. View source ↗

How it works

Reported the current database’s character-classification and case-conversion locale through PG15. It was internal/read-only and PostgreSQL 16 removed it from pg_settings.

The locale is fixed when a database is created and can differ by database. It affects locale-aware character classes and case conversion, but is not a session switch and cannot be changed with ALTER SYSTEM.

On PG16 and later, migrate SHOW/current_setting consumers to pg_database locale-provider metadata and inspect pg_collation for object-level behavior. Application tests should cover case conversion and pattern/character-class assumptions.

Operational considerations

Trying to configure a value that was always internal/read-only.

Assuming character classification is identical across databases or locale providers.

Changing locale libraries without testing expression indexes and case-conversion results.

Migrating only monitoring text while leaving applications dependent on SHOW lc_ctype.

Workload guidance

OLAP: Record locale metadata with ETL outputs whose classification or normalization depends on it. Changing the locale requires deliberate migration, not a runtime setting.

OLTP: Not tunable. Migrate readers to pg_database and test case-folding, upper/lower behavior, and expression indexes before a locale/provider upgrade.

SMALL: Keep locale choice explicit at database creation and in rebuild automation. Do not assume the host default is stable across images or operating-system upgrades.

Version history 3
  1. PG 15 → 16removed
  2. PG 13 → 14changed
  3. PG 9.5 → 9.6changed

Related entries

Further reading

Definition snapshot: english-manuals:2a6a217d0eee625b877976ea2e6… · English manual source