CREATE_TEXT_SEARCH_DICTIONARY(7pg18)
โจ CREATE_TEXT_SEARCH_DICTIONARY โจ
okay bestie, welcome to the CREATE_TEXT_SEARCH_DICTIONARY(7) page ๐ this is a PostgreSQL 18.6 documentation moment, and we're gonna make a whole new text search dictionary. no cap.
๐ธ 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 literally creates a brand 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-checker for your words.
a dictionary depends on a text search template, and that template is what specifies the functions that actually perform the work. the dictionary is kinda the main character handing over the aesthetic, and the template is the one doing the heavy lifting behind the scenes. typically the dictionary provides some options that control the detailed behavior of the template's functions.
if a schema name is given, then the text search dictionary gets created in that specified schema. otherwise? it's created in the current schema. simple as that โจ
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, if you wanna go deeper, iykyk.
๐ 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 blueprint, the foundational vibe.optionโ the name of a template-specific option to be set for this dictionary. each template has its own lil set of knobs to turn.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 gonna stop you ๐ ).
and the options can appear in any order. any order!! go wild, bestie ๐
๐ EXAMPLES ๐
okay so this next example command creates a Snowball-based dictionary with a nonstandard list of stop words. it's giving very multilingual of her:
CREATE TEXT SEARCH DICTIONARY my_russian (
template = snowball,
language = russian,
stopwords = myrussian
);
ate. no crumbs. ๐ฅ
๐ COMPATIBILITY ๐
there is no CREATE TEXT SEARCH DICTIONARY statement in the SQL standard ๐ญ like, this is a PostgreSQL exclusive, the standard simply does not have it. not our problem fr fr.
๐ SEE ALSO ๐
ALTER TEXT SEARCH DICTIONARY(ALTER_TEXT_SEARCH_DICTIONARY(7))DROP TEXT SEARCH DICTIONARY(DROP_TEXT_SEARCH_DICTIONARY(7))
and that's the whole page, bestie!! ๐ฆ this was PostgreSQL 18.6, dated 2026, and the page is CREATE TEXT SEARCH DICTIONARY(7) โ now go forth and define your dictionaries, you absolute icon ๐โจ
๐ฆ where this page comes from
- opensuse-leap 16.0: postgresql18 18.6-160000.1.1 ยท PostgreSQL
- opensuse-leap 16.0: postgresql18 18.6-160000.1.1 ยท PostgreSQL
- opensuse-leap 16.0: postgresql18 18.6-160000.1.1 ยท PostgreSQL
- opensuse-leap 16.0: postgresql18 18.6-160000.1.1 ยท PostgreSQL
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms