ALTER_TEXT_SEARCH_DICTIONARY(7pg18)
๐ ALTER TEXT SEARCH DICTIONARY ๐
okay bestie, so this is the PostgreSQL 18.6 manual page for ALTER_TEXT_SEARCH_DICTIONARY(7) โ yes the title is literally screaming at you in all caps, that's just how manpages are, they're dramatic like that ๐
โจ NAME โจ
ALTER_TEXT_SEARCH_DICTIONARY โ change the definition of a text search dictionary ๐ฆ
๐ธ SYNOPSIS ๐ธ
ALTER TEXT SEARCH DICTIONARY name (
option [ = value ] [, ... ]
)
ALTER TEXT SEARCH DICTIONARY name RENAME TO new_name
ALTER TEXT SEARCH DICTIONARY name OWNER TO { new_owner | CURRENT_ROLE | CURRENT_USER | SESSION_USER }
ALTER TEXT SEARCH DICTIONARY name SET SCHEMA new_schema
๐ DESCRIPTION ๐
So like. ALTER TEXT SEARCH DICTIONARY changes the definition of a text search dictionary. That's it, that's the whole vibe โจ
You can change the dictionary's template-specific options, or you can change the dictionary's name or owner. Mix and match, choose your own adventure, main character energy fr fr.
๐ but listen โ you must be the owner of the dictionary to use ALTER TEXT SEARCH DICTIONARY. no owner privileges, no entry. periodt.
๐ PARAMETERS ๐
nameโ the name of an existing text search dictionary. optionally schema-qualified, so you can be extra specific if you want ๐ซถoptionโ the name of a template-specific option that's getting set for this dictionary.valueโ the new value for that template-specific option. and here's the tea: if you skip the equal sign and the value entirely, then any previous setting for that option gets removed from the dictionary, which lets the default just do its thing ๐new_nameโ the new name of the text search dictionary. glow up name change โจnew_ownerโ the new owner of the text search dictionary.new_schemaโ the new schema for the text search dictionary.
also!! template-specific options can appear in any order. no rules, no order, we're free ๐ฆ
๐ EXAMPLES ๐
okay example time, this is the fun part, look at her go ๐
The following example command changes the stopword list for a Snowball-based dictionary. Other parameters remain unchanged.
ALTER TEXT SEARCH DICTIONARY my_dict ( StopWords = newrussian );
The following example command changes the language option to dutch, and removes the stopword option entirely.
ALTER TEXT SEARCH DICTIONARY my_dict ( language = dutch, StopWords );
The following example command โupdatesโ the dictionary's definition without actually changing anything. yes bestie, a no-op, and it's iconic for it ๐
ALTER TEXT SEARCH DICTIONARY my_dict ( dummy );
(The reason this works is that the option removal code doesn't complain if there is no such option.) This trick is useful when changing configuration files for the dictionary: the ALTER will force existing database sessions to re-read the configuration files, which otherwise they would never do if they had read them earlier. so like, a lil sneaky refresh button. lowkey genius, no cap ๐ฅ
๐ COMPATIBILITY ๐
There is no ALTER TEXT SEARCH DICTIONARY statement in the SQL standard. not a standard girlie, she's a PostgreSQL original ๐
๐ SEE ALSO ๐
CREATE TEXT SEARCH DICTIONARY(CREATE_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 โ go forth and alter ur 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