CREATE_TEXT_SEARCH_DICTIONARY(7pg15)
π 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 β¨
ALTER TEXT SEARCH DICTIONARY(ALTER_TEXT_SEARCH_DICTIONARY(7))DROP TEXT SEARCH DICTIONARY(DROP_TEXT_SEARCH_DICTIONARY(7))
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
- opensuse-leap 16.0: postgresql15 15.19-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql15 15.19-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql15 15.19-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql15 15.19-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