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.
At a glance
| Property | Value |
|---|---|
| Parameter | default_text_search_config |
| Category | Client Connection Defaults |
| Default | pg_catalog.simple |
| Value type | string |
| Change scope | Per-session (SET) |
| Available in | PostgreSQL 12, 13, 14, 15, 16, 17, 18, 19 (added in 12) |
What it does
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 textsearch 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.
(Description quoted from the official PostgreSQL documentation.)
How to apply a change
Can be set per session with SET, per role/database with ALTER ROLE/DATABASE ... SET, or globally in postgresql.conf.
Inspect the current value and source with SHOW default_text_search_config; or SELECT name, setting, unit, context, source FROM pg_settings WHERE name = 'default_text_search_config';.
Tuning guidance
This sets a session default (locale, formatting, search path or transaction behaviour) rather than a performance knob. Set it per role or database with ALTER ROLE/DATABASE ... SET so the right default follows the right workload, and prefer setting it explicitly in the application for behaviour the query results depend on.