CREATE_TEXT_SEARCH_CONFIGURATION(7pg15)

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

CREATE_TEXT_SEARCH_CONFIGURATION πŸ’–

okay bestie, welcome to the CREATE_TEXT_SEARCH_CONFIGURATION page from the PostgreSQL 15.19 Documentation β€” manual name 7pg15, and yes we are officially in text-search-configuration territory. πŸ¦‹βœ¨

🌸 NAME 🌸

CREATE_TEXT_SEARCH_CONFIGURATION defines a brand-new text search configuration. That’s the whole main-character move. πŸ’…

πŸŽ€ SYNOPSIS πŸŽ€

the syntax is giving very structured, no cap:

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

πŸ’… DESCRIPTION πŸ’…

CREATE TEXT SEARCH CONFIGURATION creates a new text search configuration. A text search configuration 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. literally the parser + dictionary situation. 🧚✨

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. 🫢

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. 🌈

The user who defines a text search configuration becomes its owner. periodt. πŸ‘‘

Refer to Chapter 12 for further information. πŸ“–

πŸ“ PARAMETERS πŸ“

  • name β€” the name of the text search configuration to be created, bestie. 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 like, they cannot both show up in the same fit. πŸ’…

mutually exclusive means exactly that β€” choose one, bestie. no cap. πŸ”₯

πŸ’€ COMPATIBILITY πŸ’€

There is no CREATE TEXT SEARCH CONFIGURATION statement in the SQL standard. not a single one. πŸ™ˆ

🌟 SEE ALSO 🌟


πŸ’– cute sign-off: PostgreSQL 15.19, dated 2026, page CREATE TE...IGURATION(7) β€” now go make your text search configs iconic, bestie! πŸ’…βœ¨

πŸ“¦ where this page comes from