CREATE_TEXT_SEARCH_CONFIGURATION(7pg13)

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

πŸ’– CREATE_TEXT_SEARCH_CONFIGURATION πŸ’–

okay bestie, welcome to the CREATE_TEXT_SEARCH_CONFIGURATION page from the PostgreSQL docs β€” this is the 7pg13 manual, and it's literally here to define a new text search configuration. no cap, it's giving main character energy for ur search setup. πŸŽ€

✨ NAME ✨

CREATE_TEXT_SEARCH_CONFIGURATION β€” define a new text search configuration.

πŸ¦‹ SYNOPSIS πŸ¦‹

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. so it's parser girlie + dictionary besties working together, periodt. ✨

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. got it? iconic. πŸ’…

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

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, because when an existing configuration is copied, its parser selection is copied too. so like, pick one bestie β€” they do not share the aux. πŸ™ˆ

🌈 COMPATIBILITY 🌈

there is no CREATE TEXT SEARCH CONFIGURATION statement in the SQL standard. the standard said β€œnot me,” and honestly we respect it. πŸ’…

πŸ”₯ SEE ALSO πŸ”₯


mwah πŸ’‹ this page is signed off by PostgreSQL 13.23, dated 2025, and it's your CREATE_TEXT_SEARCH_CONFIGURATION bestie from the 7pg13 manual. now go make those configs iconic, slay. πŸŽ€βœ¨

πŸ“¦ where this page comes from