DROP_TEXT_SEARCH_TEMPLATE(7pg17)
π 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 π
ALTER TEXT SEARCH TEMPLATE(ALTER_TEXT_SEARCH_TEMPLATE(7))CREATE TEXT SEARCH TEMPLATE(CREATE_TEXT_SEARCH_TEMPLATE(7))
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
- opensuse-leap 16.0: postgresql17 17.11-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql17 17.11-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql17 17.11-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql17 17.11-160000.1.1 Β· PostgreSQL
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms