DROP_TEXT_SEARCH_DICTIONARY(7pg17)

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

πŸ’… DROP_TEXT_SEARCH_DICTIONARY πŸ’…

okay bestie, so this is the DROP TEXT SEARCH DICTIONARY page from the PostgreSQL 17.11 Documentation β€” yes, the real one, and yes, we're gonna make it cute. it lives in section 7, the SQL commands section, so you already know it's giving "i do things to your database" energy. πŸŽ€


✨ NAME ✨

DROP_TEXT_SEARCH_DICTIONARY β€” remove a text search dictionary. that's it. that's the whole job. bye dictionary πŸ‘‹πŸ’–


🌸 SYNOPSIS 🌸

DROP TEXT SEARCH DICTIONARY [ IF EXISTS ] name [ CASCADE | RESTRICT ]

look at her. so clean. so structured. the brackets are optional and she knows it πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so DROP TEXT SEARCH DICTIONARY drops an existing text search dictionary. like, it literally removes it from existence. gone. not in your database anymore. powerless. πŸ’€

but here's the vibe check that matters: to execute this command you must be the owner of the dictionary. so if it's not yours, don't touch it bestie, that's not your main character moment πŸš«πŸ‘‘


πŸŽ€ PARAMETERS πŸŽ€

  • IF EXISTS β€” this one's the emotional support flag 🫢 it tells Postgres "do not throw an error if the text search dictionary does not exist." instead, a notice is issued in this case. so like, she's still gonna say something, just not in a mean way. a little "hey, that wasn't there, no biggie" note ✨
  • name β€” the name of an existing text search dictionary, and it's optionally schema-qualified</> so you can be all myschema.mydict if you're feeling fancy 🧚
  • CASCADE β€” the "take everyone with you" option 😭 it automatically drops objects that depend on the text search dictionary, and in turn all objects that depend on those objects (see Section 5.15). yes, it chains. yes, that's a lot of dropping. periodt 🌈
  • RESTRICT β€” the cautious queen πŸ‘‘ she refuses to drop the text search dictionary if any objects depend on it. and guess what? this is the default. so if you don't pick anything, you get RESTRICT energy by default. safe. sensible. no cap.

πŸ“ EXAMPLES πŸ“

wanna remove the text search dictionary english? say less:

DROP TEXT SEARCH DICTIONARY english;

but ngl, that command will not succeed if there are any existing text search configurations that use the dictionary. like, they're holding on and they're not letting go πŸ™ˆ so if you want those gone too, add CASCADE to drop such configurations along with the dictionary. one command, whole friend group leaves together πŸ’€πŸ”₯


⭐ COMPATIBILITY ⭐

bad news for the standards girlies: there is no DROP TEXT SEARCH DICTIONARY statement in the SQL standard. this is a Postgres-exclusive situation. iykyk πŸ’…


🌈 SEE ALSO 🌈

go read those too, bestie, you'll be so smart 🧠✨


and that's the whole page 🫢 brought to you by PostgreSQL 17.11, dated 2026 β€” mwah, love you, go drop some dictionaries responsibly πŸ’–πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from