DB Internals AtlasPostgreSQL 18.6 Home About

Parameter · Client Connection Defaults / Locale and Formatting

icu_validation_level

Log level for reporting invalid ICU locale strings.

  • Default: warning
  • Type: enum
  • Values: disabled · debug5 · debug4 · debug3 · debug2 · debug1 · log · notice · warning · error
  • Applies: Session (any user)

In plain words

ICU is the library PostgreSQL can use for language-aware sorting. When you create a collation or database with an ICU locale name, PostgreSQL checks whether ICU really knows it. This setting decides how loudly a problem is reported: not at all, a warning (default), or an error that stops the command.

For DBAs and operators

Added in PostgreSQL 16. Checks happen in CREATE COLLATION and CREATE DATABASE when the provider is icu (initdb runs its own check, which always fails on an unknown language). ICU accepts almost any string and silently falls back to the root locale, so a typo like de-DR would otherwise give you generic sorting without anyone noticing.

The value is a message level: error makes the command fail, warning/notice let it succeed with a message, log and debug* are seen only if log_min_messages or client_min_messages lets them through, disabled skips validation. Real messages:

WARNING: ICU locale "xx-bogus" has unknown language "xx"
HINT: To disable ICU locale validation, set the parameter "icu_validation_level" to "disabled".

For deployment scripts, set it to error so a wrong locale fails loudly. Check existing ICU collations with SELECT collname, colllocale FROM pg_collation WHERE collprovider = 'i' (the column was called colliculocale before PostgreSQL 17).

How to change it

Any user can change it for their session with SET.

Related parameters

lc_messages client_min_messages

All Client Connection Defaults parameters