DROP_TEXT_SEARCH_TEMPLATE(7pg17)

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

πŸ’… DROP TEXT SEARCH TEMPLATE πŸ’…

okay bestie, welcome to the DROP TEXT SEARCH TEMPLATE page from the PostgreSQL 17.11 Documentation β€” yes that's the whole title, it got abbreviated to DROP TEX... TEMPLATE(7) in the header because the terminal was being dramatic. anyway. let's get into it 🫢


✨ NAME ✨

DROP_TEXT_SEARCH_TEMPLATE β€” literally just removes a text search template. that's the whole gig. πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

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

look at her. gorgeous. brackets mean optional, | means pick one, you know the drill iykyk 🌸


πŸ¦‹ DESCRIPTION πŸ¦‹

so like β€” DROP TEXT SEARCH TEMPLATE drops an existing text search template. gone. bye. ✨

⚠️ heads up bestie: you must be a superuser to use this command. no superuser, no drop. it's giving exclusive. πŸ‘‘

🌈 PARAMETERS 🌈

  • IF EXISTS β€” do not throw an error if the text search template does not exist. instead, a notice is issued in this case. so like, it's chill about it instead of screaming at you 😌
  • name β€” the name (optionally schema-qualified) of an existing text search template. that's the one you're yeeting πŸ’€
  • CASCADE β€” automatically drop objects that depend on the text search template, and in turn all objects that depend on those objects (see Section 5.15). it's a whole chain reaction, main character 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, she's playing it safe πŸ›‘οΈ

πŸ“ EXAMPLES πŸ“

remove the text search template thesaurus:

DROP TEXT SEARCH TEMPLATE thesaurus;

okay but here's the thing β€” this command will not succeed if there are any existing text search dictionaries that use the template 😭. so if she's refusing, add CASCADE to drop such dictionaries along with the template. problem solved, slay. ✨


🧚 COMPATIBILITY 🧚

there is no DROP TEXT SEARCH TEMPLATE statement in the SQL standard. so like, this is very much a PostgreSQL thing. no cap. πŸ™ˆ


πŸ’œ SEE ALSO πŸ’œ

go read those next bestie, they're lowkey iconic too πŸ‘‘


and that's the page!! πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈ brought to you by PostgreSQL 17.11, dated 2026, footer DROP TEX... TEMPLATE(7) and all β€” mwah πŸ’‹ periodt.

πŸ“¦ where this page comes from