CREATE_TEXT_SEARCH_CONFIGURATION(7pg16)

πŸ“¦ version 16.15, in opensuse-leap 16.0

🌸 NAME 🌸

okay so this is the CREATE_TEXT_SEARCH_CONFIGURATION(7pg16) page from the PostgreSQL 16.15 docs πŸ’– β€” and it's literally CREATE_TEXT_SEARCH_CONFIGURATION - define a new text search configuration. No cap, that's the whole point. 🫢

✨ SYNOPSIS ✨

the syntax is short and iconic:

CREATE TEXT SEARCH CONFIGURATION name (
    PARSER = parser_name |
    COPY = source_config
)

πŸ’– DESCRIPTION πŸ’–

okay so CREATE TEXT SEARCH CONFIGURATION creates a brand-new text search configuration. A text search configuration specifies a text search parser β€” the thing that can divide a string into tokens β€” plus dictionaries that can be used to determine which tokens are of interest for searching. It's giving search-brain, and we love that. πŸ”₯

if only the parser is specified, then the new text search configuration initially has no mappings from token types to dictionaries, and therefore will ignore all words 😭. Subsequent ALTER TEXT SEARCH CONFIGURATION commands must be used to create mappings to make the configuration useful. Alternatively, an existing text search configuration can be copied β€” slay, reuse the vibe. ✨

if a schema name is given then the text search configuration is created in the specified schema. Otherwise it is created in the current schema. πŸ’…

the user who defines a text search configuration becomes its owner. main character energy, but make it ownership. πŸ‘‘

refer to Chapter 12 for further information. iykyk. πŸ¦‹

πŸŽ€ PARAMETERS πŸŽ€

  • name β€” the name of the text search configuration to be created. The name can be schema-qualified. πŸŽ€
  • parser_name β€” the name of the text search parser to use for this configuration. ✨
  • source_config β€” the name of an existing text search configuration to copy. 🫢

πŸ’€ NOTES πŸ’€

the PARSER and COPY options are mutually exclusive, bestie β€” you cannot use both. Why? Because when an existing configuration is copied, its parser selection is copied too. So yeah, they're not a combo meal. πŸ™…β€β™€οΈ

🌈 COMPATIBILITY 🌈

There is no CREATE TEXT SEARCH CONFIGURATION statement in the SQL standard. that's just the tea. πŸ™ˆ

πŸ‘‘ SEE ALSO πŸ‘‘


xoxo, PostgreSQL 16.15 Β· 2026 Β· CREATE_TEXT_SEARCH_CONFIGURATION(7pg16) πŸŽ€πŸ’…

πŸ“¦ where this page comes from