Skip to content

lc_ctype

lc_ctype — Shows the character classification and case conversion locale. Observed in PG9.0–15; its last measured boot default is C in PG15, with internal context. It was removed in PG16.
Note

Fact — official short description: “Shows the character classification and case conversion locale.”

Identity

Type , Valuestring
Upstream pg_settings type
Context , Valueinternal
Internal/preset and not user-settable
Unit , Value
Raw unit
Range , Value
Raw limits in the last observed version
Enum values , Value
— for non-enum types
Category , ValuePreset Options
Upstream classification
Latest boot value , ValueC
C

Lifecycle

Fact Value
First observed PG9.0 (research boundary)
Present in PG9.0–15
Removed in PG16
Introduction commit Not asserted: predates the PG9.0 research boundary
Commit date
Discussion

Default history

Measured PG9.0–19 Beta 3 boot defaults
Versions Raw boot_val Unit Human value
PG9.0–15 C C

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.

Tuning advice

Tip

Advice. These are workload-specific starting points and must be validated with measurements.

Workload Guidance
OLTP Not tunable. Migrate readers to pg_database and test case-folding, upper/lower behavior, and expression indexes before a locale/provider upgrade.
OLAP Record locale metadata with ETL outputs whose classification or normalization depends on it. Changing the locale requires deliberate migration, not a runtime setting.
Small nodes 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.

Pigsty

Values use the fixed 8-vCPU, 32-GiB, 100-GiB SSD fixture and render the current Pigsty templates for PG15; this does not assert current Pigsty support for that historical or beta release.

Template Effective value Versus upstream boot Source expression
OLTP Unmodified
OLAP Unmodified
CRIT Unmodified
TINY Unmodified
Caution

Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG9.0–15 unmodified; OLAP: PG9.0–15 unmodified; CRIT: PG9.0–15 unmodified; TINY: PG9.0–15 unmodified. No Pigsty-specific rationale is inferred from an absent override.

Common pitfalls

  • 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.

lc_collate · server_encoding · client_encoding · icu_validation_level · default_text_search_config · server_version_num

References