↑↓ select ↵ open ⌫ change scope Open full search

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

GUC Parameters / Preset Options

Reports the locale in which sorting of textual data is done.

Reading PG 15·documented in 18 of 24 versions, 8.0 to 15

Type
string
Context
internal
Measured default
C
Unit
—
Metadata snapshot
15

Definition PG 15 manual

Reports the locale in which sorting of textual data is done. See Section 24.1 for more information. This value is determined when a database is created.

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 collation locale through PG15. It was an internal read-only value, not a configurable GUC, and PostgreSQL 16 removed it from pg_settings.

The collation locale is selected when a database is created and can differ between databases in one cluster. It affects ordering and comparison semantics; changing the server configuration cannot rewrite existing indexes or database locale metadata.

On PG16 and later, monitoring and applications should read the current database row in pg_database and its locale-provider-specific metadata, and use pg_collation for individual collation objects. Test collation-version changes separately from this removed reporter.

Operational considerations

Trying to remove or set lc_collate in configuration even though it was always internal/read-only.

Assuming one cluster-wide value applies to every database.

Changing operating-system or ICU locale data without checking collation versions and rebuilding affected indexes.

Comparing text behavior across providers using only a locale name.

Workload guidance

OLAP: Record per-database provider and locale beside analytical exports. A desired collation change requires a deliberate database/object migration and possible REINDEX, not a GUC edit.

OLTP: Not tunable. Replace SHOW/current_setting readers with a version-aware pg_database query, and regression-test indexed ordering and uniqueness when moving databases between locale providers or versions.

SMALL: Use the database-creation default only when it is intentional. Preserve locale metadata in inventory and backups so a rebuild does not silently choose different ordering rules.

Version history 7
  1. 15 → 16 removed
  2. 13 → 14 changed
  3. 9.5 → 9.6 changed
  4. 8.3 → 8.4 changed
  5. 8.2 → 8.3 changed
  6. 8.0 → 8.1 changed
  7. 7.4 → 8.0 added

Related entries

Further reading

Definition snapshot: english-manuals:54132028a4057f62d499a06a470… · English manual source