CREATE_TEXT_SEARCH_DICTIONARY(7pg16)

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

✨ CREATE_TEXT_SEARCH_DICTIONARY ✨

Okay bestie, welcome to the CREATE_TEXT_SEARCH_DICTIONARY(7) page β€” PostgreSQL 16.15 vibes, and honestly? This one's kind of a queen. πŸ’…

🌸 NAME 🌸

CREATE_TEXT_SEARCH_DICTIONARY β€” literally define a brand new text search dictionary. That's it, that's the whole job. πŸŽ€

πŸ¦‹ SYNOPSIS πŸ¦‹

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

πŸ’– DESCRIPTION πŸ’–

So CREATE TEXT SEARCH_DICTIONARY creates a new text search dictionary. And what even is a text search dictionary, you ask? πŸ‘€ It's the thing that specifies a way of recognizing interesting or uninteresting words for searching. Like, it's the vibe check for words, fr fr.

A dictionary depends on a text search template, which specifies the functions that actually perform the work. The dictionary itself is kind of the main character offering up the options β€” typically it provides some options that control the detailed behavior of the template's functions. 🫢

If you give a schema name, the text search dictionary gets created in that specified schema. If you don't? It's created in the current schema. Default behavior, no cap. ✨

And here's a cute one: the user who defines a text search dictionary becomes its owner. You made it, you own it, periodt. πŸ‘‘

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

🌈 PARAMETERS 🌈

  • name β€” the name of the text search dictionary to be created. The name can be schema-qualified, so go ahead and be all fancy with it. ⭐
  • template β€” the name of the text search template that will define the basic behavior of this dictionary. This is the blueprint, bestie. 🧚
  • option β€” the name of a template-specific option to be set for this dictionary. Template-specific, so like, the template's rules apply. 🌸
  • value β€” the value to use for that template-specific option. Here's the thing: if the value is not a simple identifier or number, it must be quoted. (But you can always quote it, if you wish β€” no one's stopping you, live your truth. πŸ’œ)

The options can appear in any order. Slay, honestly. πŸŽ€

πŸ”₯ EXAMPLES πŸ”₯

The following example command creates a Snowball-based dictionary with a nonstandard list of stop words. Look at her go:

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

Obsessed. πŸ’–

πŸ’€ COMPATIBILITY πŸ’€

There is no CREATE TEXT SEARCH DICTIONARY statement in the SQL standard. Not a thing. So if someone tells you there is, they're lying to you, bestie. 🚩

πŸ‘‘ SEE ALSO πŸ‘‘


And that's the whole page, bestie! ✨ Go forth and make dictionaries. πŸ¦‹ This little gem is straight out of the PostgreSQL 16.15 documentation, dated 2026 β€” and yes, CREATE_TEXT_SEARCH_DICTIONARY(7) is serving full manual-page energy. πŸ’…πŸŽ€

πŸ“¦ where this page comes from