CREATE_TEXT_SEARCH_CONFIGURATION(7pg17)

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

πŸ’– CREATE_TEXT_SEARCH_CONFIGURATION πŸ’–

okay bestie, welcome to the 7pg17 manual page for CREATE_TEXT_SEARCH_CONFIGURATION β€” PostgreSQL 17.11 documentation, and yes we're gonna make text search configs make sense. 🫢


🌸 NAME 🌸

CREATE_TEXT_SEARCH_CONFIGURATION β€” define a new text search configuration. That's it, that's the name, no cap. πŸ’…

✨ SYNOPSIS ✨

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

πŸ¦‹ DESCRIPTION πŸ¦‹

So CREATE TEXT SEARCH CONFIGURATION literally creates a new text search configuration. A text search configuration is the whole setup: it specifies a text search parser 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 "tokenizer meets dictionary gatekeeping" energy, and honestly? iconic. πŸ’…

If you only specify the parser, then the new text search configuration initially has no mappings from token types to dictionaries, and therefore will ignore all words. Yep, all of them. 😭 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. Copy-paste slay. πŸ“‹βœ¨

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. Lowkey important, bestie. 🫢

The user who defines a text search configuration becomes its owner. Main character energy, fr fr. πŸ‘‘

Refer to Chapter 12 for further information. That's the deep lore β€” go read it. πŸ“–

πŸŽ€ 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, because when an existing configuration is copied, its parser selection is copied too. So don't try to do both, bestie β€” that's not a vibe. πŸš«πŸ’€

🌈 COMPATIBILITY 🌈

There is no CREATE TEXT SEARCH CONFIGURATION statement in the SQL standard. Not a single one. πŸ’€

πŸ”₯ SEE ALSO πŸ”₯


that's the whole page, bestie. xoxo, PostgreSQL 17.11 documentation from 2026, page CREATE TE...IGURATION(7) πŸ’…βœ¨

πŸ“¦ where this page comes from