default_text_search_config
Read PG 18 manual ↗Selects the text search configuration that is used by those variants of the text search functions that do not have an explicit argument specifying the configuration.
- Type
- string
- Context
- user
- Measured default
- pg_catalog.simple
- Unit
- —
- Metadata snapshot
- 18
Definition PG 18 manual
Selects the text search configuration that is used by those variants of the text search functions that do not have an explicit argument specifying the configuration. See Chapter 12 for further information. The built-in default is pg_catalog.simple, but initdb will initialize the configuration file with a setting that corresponds to the chosen lc_ctype locale, if a configuration matching that locale can be identified.
Measured default history
| Version interval | Default |
|---|---|
| 9.0 – 19 | pg_catalog.simple |
Authored guidance from the GUC source snapshot; the version-specific manual above is the definition reference. View source ↗
How it works
default_text_search_config sets default text search configuration. Text-search functions use it only when the caller omits an explicit configuration; initdb may choose a locale-matching value instead of the built-in simple configuration.
default_text_search_config is a USER-context setting. An authorized role can change it for a session, while ALTER ROLE or ALTER DATABASE can establish a default for future sessions.
It changes representation, parsing, or locale behavior at the client boundary rather than physical storage. Coordinate it with the other locale and formatting settings and with driver-native binary or typed protocols.
Operational considerations
Changing default_text_search_config in one session and assuming role defaults, database defaults, or other pooled sessions changed with it.
Assuming a presentation setting changes stored values or server-side type semantics.
Changing a role or database default without testing text-parsing clients, exports, and pooled sessions.
Changing default_text_search_config globally without a rollback plan and a client or operational compatibility test.
Workload guidance
OLAP: Pin the configuration in reproducible indexing and reporting jobs so locale changes do not silently alter tokenization or ranking.
OLTP: Set default_text_search_config per language domain and application role, or pass the configuration explicitly in durable queries. Verify dictionaries and packages on every replica.
SMALL: Use pg_catalog.simple or the initdb-selected locale configuration unless language-aware search is required; extra dictionaries add maintenance, not free quality.
Related entries
Further reading
Definition snapshot: english-manuals:9d5c91af0771bf61fda3216c881… · English manual source