CREATE_TEXT_SEARCH_DICTIONARY(7pg15)

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

πŸ’… CREATE_TEXT_SEARCH_DICTIONARY (7pg15)

okay so bestie, you want to make a whole new text search dictionary? iconic. this is the CREATE_TEXT_SEARCH_DICTIONARY page, and honestly it's short but it slaps. let's get into it πŸŽ€


✨ NAME ✨

CREATE_TEXT_SEARCH_DICTIONARY β€” define a new text search dictionary πŸ¦‹


✨ SYNOPSIS ✨

CREATE TEXT SEARCH DICTIONARY name (
    TEMPLATE = template
    [, option = value [, ... ]]
)

like... that's the whole shape of it. cute, right? 🌸


✨ DESCRIPTION ✨

so CREATE TEXT_SEARCH_DICTIONARY... wait no, CREATE TEXT SEARCH DICTIONARY (no underscores between the words, bestie, the underscores are inside the name) creates a new text search dictionary. and a text search dictionary is literally just a way of recognizing which words are interesting πŸ‘€ and which words are uninteresting πŸ’€ for searching.

here's the tea: a dictionary depends on a text search template. the template is the thing that specifies the functions that actually do the work. the dictionary itself is more like the vibe β€” typically it just provides some options that control the detailed behavior of the template's functions. main character template, supporting-role dictionary, iykyk πŸ’…

now, if you give a schema name, the text search dictionary gets created in that specified schema. otherwise it just gets created in the current schema. no cap. ✨

and whoever defines the text search dictionary? they become its owner. πŸ‘‘ congrats, it's yours now.

refer to Chapter 12 for further information β€” that's where the deep lore lives πŸ“–


✨ PARAMETERS ✨

  • name β€” the name of the text search dictionary to be created. and yes, the name can be schema-qualified 🫢
  • template β€” the name of the text search template that will define the basic behavior of this dictionary. this is the one setting the whole vibe.
  • option β€” the name of a template-specific option to be set for this dictionary 🌈
  • value β€” the value to use for a template-specific option. if the value is not a simple identifier or number, it must be quoted β€” but honestly you can always quote it if you wish, no one's stopping you πŸ’–

and the options can appear in any order. free spirit behavior, we love to see it πŸ¦‹


✨ EXAMPLES ✨

ok so this next command creates a Snowball-based dictionary with a nonstandard list of stop words. obsessed. πŸ”₯

CREATE TEXT SEARCH DICTIONARY my_russian (
    template = snowball,
    language = russian,
    stopwords = myrussian
);

look at her go πŸ˜­πŸ’œ


✨ COMPATIBILITY ✨

bad news bestie: there is no CREATE TEXT SEARCH DICTIONARY statement in the SQL standard. it's simply not a thing there. πŸ’€


✨ SEE ALSO ✨

go give those a read too, they're the whole ecosystem 🧚✨


ngl, that's the entire page. short, sweet, and every detail intact. slay. πŸ’…

mwah πŸ’‹ β€” this masterpiece is courtesy of PostgreSQL 15.19, dated 2026. go off, PostgreSQL. periodt. πŸŽ€

πŸ“¦ where this page comes from