DROP_TEXT_SEARCH_DICTIONARY(7pg15)

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

πŸ’… DROP TEXT SEARCH DICTIONARY πŸ’…

ok so bestie, real talk β€” this is the DROP TEXT SEARCH DICTIONARY page from the PostgreSQL 15.19 documentation, and it's genuinely one of the easier ones. no cap. it's a one-job icon: it deletes a text search dictionary. that's it. that's the whole vibe. let's get into it πŸŽ€


✨ NAME ✨

DROP_TEXT_SEARCH_DICTIONARY β€” remove a text search dictionary πŸ—‘οΈβœ¨

like, poof. gone. bye dictionary.


πŸ¦‹ SYNOPSIS πŸ¦‹

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

look at her. short, sweet, does exactly what she says on the tin πŸ’…


🌸 DESCRIPTION 🌸

DROP TEXT SEARCH DICTIONARY drops an existing text search dictionary. that's the whole thing. main character energy, zero plot twists.

but β€” and this is the important bit β€” to run this command you must be the owner of the dictionary. not a random, not a spectator. the owner. so do a little vibe check on your permissions before you start dropping things, okay? 🫢


πŸ”₯ PARAMETERS πŸ”₯

  • IF EXISTS β€” do not throw an error if the text search dictionary doesn't exist. instead, a notice gets issued in that case. so like, it's the "no drama" flag. the dictionary isn't there? cool, we're not gonna scream about it, we'll just leave a lil note πŸ™ˆ
  • name β€” the name of an existing text search dictionary. it can optionally be schema-qualified, so you can be all specific about it if you want ✨
  • CASCADE β€” automatically drop objects that depend on the text search dictionary, and in turn all objects that depend on those objects (see Section 5.14). it's giving domino effect, honestly πŸ’€
  • RESTRICT β€” refuse to drop the text search dictionary if any objects depend on it. this is the default, so if you don't say anything, this is what you get. protective queen behavior πŸ‘‘
⚠️ heads up bestie: RESTRICT is the default, so if something depends on your dictionary and you didn't ask for CASCADE, the whole thing just… won't happen. plan accordingly πŸ’–

🌈 EXAMPLES 🌈

ok so say you wanna remove the text search dictionary english. iconic name btw. you'd do:

DROP TEXT SEARCH DICTIONARY english;

BUT β€” and this is the plot twist 😭 β€” this command will not succeed if there are any existing text search configurations that use the dictionary. like, they're holding onto it. it's their emotional support dictionary.

so if you want to drop those configurations along with the dictionary, just add CASCADE:

DROP TEXT SEARCH DICTIONARY english CASCADE;

see? slay. simple. πŸ”₯


πŸ’œ COMPATIBILITY πŸ’œ

here's the tea: there is no DROP TEXT SEARCH DICTIONARY statement in the SQL standard. at all. not a thing. it's a PostgreSQL original, iykyk 🧚


⭐ SEE ALSO ⭐

go read those next, bestie, they're the prequel and the glow-up ✨


and that's the whole page! πŸŽ€ this little masterpiece comes to you from the PostgreSQL 15.19 documentation, dated 2026, and you'll find it filed under DROP TEX...ICTIONARY(7) in the manual. mwah πŸ’‹ go forth and drop responsibly πŸ«ΆπŸ’–

πŸ“¦ where this page comes from