DROP_TEXT_SEARCH_TEMPLATE(7pg13)

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

πŸ’… DROP_TEXT_SEARCH_TEMPLATE β€” remove a text search template ✨

okay bestie, this is the PostgreSQL 13.23 page for DROP_TEXT_SEARCH_TEMPLATE, and it's honestly such a niche icon. it's the DROP TEXT SEARCH TEMPLATE command, and it does exactly one thing: yeets an existing text search template out of existence. no cap. πŸ—‘οΈβœ¨

🚨 real talk first: you must be a superuser to use this command. like, this is not a vibe check you can just wander into. superuser only. periodt.

πŸŽ€ SYNOPSIS πŸŽ€

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

🌸 DESCRIPTION 🌸

DROP TEXT SEARCH TEMPLATE drops an existing text search template. that's the whole gig. the way that it just… removes it. πŸ’€

and again, because it bears repeating: you must be a superuser to use this command. not optional, not negotiable, not "well i know the password"β€”superuser. πŸ‘‘


✨ PARAMETERS ✨

  • IF EXISTS β€” do not throw an error if the text search template doesn't exist. instead, a notice is issued. so thoughtful 🫢 it's giving "no drama, just a little heads up."
  • name β€” the name (optionally schema-qualified) of an existing text search template. yes bestie, schema-qualified is allowed, live your life πŸ’–
  • CASCADE β€” automatically drop objects that depend on the text search template, and in turn all objects that depend on those objects (see Section 5.14). it's the chain reaction option πŸ”₯ domino effect energy.
  • RESTRICT β€” refuse to drop the text search template if any objects depend on it. This is the default. so if you don't say anything, it's gonna be protective and say no πŸ™ˆ iconic boundary-setting honestly.

πŸ¦‹ EXAMPLES πŸ¦‹

remove the text search template thesaurus:

DROP TEXT SEARCH TEMPLATE thesaurus;

okay so heads up: this command will not succeed if there are any existing text search dictionaries that use the template. 😭 it's not being difficult, it's just got attachments.

add CASCADE to drop such dictionaries along with the template. one clean sweep, no leftover messes 🧹✨


🌈 COMPATIBILITY 🌈

there is no DROP TEXT SEARCH TEMPLATE statement in the SQL standard. so like... this is a PostgreSQL original, main character energy only πŸ‘‘πŸ’…


πŸ’œ SEE ALSO πŸ’œ


🌸 mwah, that's the page! this lil masterpiece is from PostgreSQL 13.23, dated 2025, and honestly? she ate. go drop those templates responsibly bestie πŸ«ΆπŸ’–πŸŽ€

πŸ“¦ where this page comes from