CREATE_TEXT_SEARCH_DICTIONARY(7pg17)
π CREATE_TEXT_SEARCH_DICTIONARY β okay so let's make a dictionary bestie
So this is straight outta the PostgreSQL 17.11 Documentation, and it's the CREATE_TEXT_SEARCH_DICTIONARY(7) page, and honestly? Underrated. 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 [, ... ]]
)
π DESCRIPTION π
Okay so CREATE TEXT SEARCH DICTIONARY literally creates a new text search dictionary. And what even is that? It's the thing that specifies a way of recognizing interesting or uninteresting words for searching. That's the whole vibe β it filters and classifies words π¦
A dictionary depends on a text search template, which is the thing that specifies the functions that actually perform the work. So the template does the heavy lifting, and typically the dictionary provides some options that control the detailed behavior of the template's functions. Teamwork, no cap π
If a schema name is given, then the text search dictionary is created in the specified schema. Otherwise it is created in the current schema. Simple as that β¨
The user who defines a text search dictionary becomes its owner. Main character energy, you own what you make π
Refer to Chapter 12 for further information. Highly recommend, iykyk π
π PARAMETERS π
nameβ the name of the text search dictionary to be created. The name can be schema-qualified, slay πtemplateβ the name of the text search template that will define the basic behavior of this dictionary. It's giving foundational π§optionβ the name of a template-specific option to be set for this dictionary πΈvalueβ the value to use for a template-specific option. Heads up bestie: if the value is not a simple identifier or number, it must be quoted (but you can always quote it, if you wish) π
The options can appear in any order. No rules, just vibes β
π₯ 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
);
π COMPATIBILITY π
There is no CREATE TEXT SEARCH DICTIONARY statement in the SQL standard. Not a thing. Zero. Nada. We're built different π«Ά
π SEE ALSO π
ALTER TEXT SEARCH DICTIONARY(ALTER_TEXT_SEARCH_DICTIONARY(7))DROP TEXT SEARCH DICTIONARY(DROP_TEXT_SEARCH_DICTIONARY(7))
Go read those next, bestie, they're iconic π
And that's the page!! Sending you off with the deets: this was PostgreSQL 17.11, dated 2026, and yes I typed all of this for you πβ¨π mwah
π¦ where this page comes from
- opensuse-leap 16.0: postgresql17 17.11-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql17 17.11-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql17 17.11-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql17 17.11-160000.1.1 Β· PostgreSQL
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms