DROP_TEXT_SEARCH_TEMPLATE(7pg16)

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

πŸ’… DROP_TEXT_SEARCH_TEMPLATE(7) β€” the PostgreSQL 16.15 glow-up edit ✨

okay bestie, so we're deep in the PostgreSQL 16.15 documentation and this little icon is DROP_TEXT_SEARCH_TEMPLATE, living its best life in section 7. let me walk you through it 🫢


🌸 NAME 🌸

DROP_TEXT_SEARCH_TEMPLATE β€” literally just yeets a text search template out of existence. remove a text search template, that's the whole gig πŸ’–


✨ SYNOPSIS ✨

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

that's it. that's the incantation. memorize it, screenshot it, put it on your lock screen πŸŽ€


πŸ¦‹ DESCRIPTION πŸ¦‹

DROP TEXT SEARCH TEMPLATE drops an existing text search template.

like, gone. poof. πŸ’¨

but here's the vibe check, bestie:

You must be a superuser to use this command.

no cap. if you're not a superuser, this is not your moment. this is not your era. hand the keyboard to someone with the credentials πŸ‘‘


🌈 PARAMETERS 🌈

  • IF EXISTS β€” do not throw an error if the text search template doesn't exist. instead, a notice gets issued, which is honestly so much gentler. it's giving "no drama, just a lil heads up" πŸ™ˆ
  • name β€” the name of an existing text search template. and yes, it can be optionally schema-qualified, so you can be all specific and fancy about it if you want πŸŽ€
  • CASCADE β€” automatically drops objects that depend on the text search template, and, in turn, all objects that depend on those objects. the domino effect, the chain reaction, the whole ripple. (see Section 5.14 for the full lore πŸ‘€)
  • RESTRICT β€” refuses to drop the text search template if any objects depend on it. this is the default, so lowkey this is what you get unless you say otherwise. it's the safe, sensible, protective bestie of the two πŸ’…

πŸ“ EXAMPLES πŸ“

okay so say you wanna remove the text search template thesaurus. you literally just:

DROP TEXT SEARCH TEMPLATE thesaurus;

slay. but heads up, queen:

This command will not succeed if there are any existing text search dictionaries that use the template.

so if those dictionaries are out there being dependent, you gotta add CASCADE to drop such dictionaries along with the template. that's the move. that's the fix. πŸ”₯


πŸ’œ COMPATIBILITY πŸ’œ

ngl this one's short and sweet:

There is no DROP TEXT SEARCH TEMPLATE statement in the SQL standard.

so it's a PostgreSQL original, not a standard-SQL thing. main character energy, honestly πŸ‘‘


⭐ SEE ALSO ⭐

go read these next, bestie, they're literally right there:

iykyk πŸ’–


πŸŽ€ and that's the page!! footer deets so you know exactly where this came from: PostgreSQL 16.15, dated 2026, for DROP_TEXT_SEARCH_TEMPLATE(7). drink water, back up your databases, and don't drop templates you still need πŸ§šπŸ’œ

πŸ“¦ where this page comes from