DROP_TEXT_SEARCH_TEMPLATE(7pg18)
โจ DROP TEXT SEARCH TEMPLATE ๐
okay bestie, so this page is literally all about DROP TEXT SEARCH TEMPLATE โ the PostgreSQL 18.6 command that removes a text search template. that's it, that's the whole vibe. let's get into it ๐
๐ธ SYNOPSIS ๐ธ
DROP TEXT SEARCH TEMPLATE [ IF EXISTS ] name [ CASCADE | RESTRICT ]
๐ DESCRIPTION ๐
so DROP TEXT SEARCH TEMPLATE does exactly what it says on the tin โ it drops an existing text search template. gone. deleted. no more. ๐ฆ
but listen, important part: you must be a superuser to use this command. this is not a regular-user situation, it's giving main character privileges only. ๐
โจ PARAMETERS โจ
IF EXISTSโ do not throw an error if the text search template doesn't exist. instead it just issues a notice, like "hey girl, there was nothing there anyway, no biggie" ๐nameโ the name of an existing text search template. it can be optionally schema-qualified, so you can be extra specific if you want. ๐CASCADEโ automatically drops objects that depend on the text search template, and then in turn all the objects that depend on those objects (see Section 5.15). it's a whole chain reaction, dominoes falling, very dramatic. ๐RESTRICTโ refuses to drop the text search template if any objects depend on it. this is the default, so if you don't say anything, this is what you get. ๐ซถ
๐ EXAMPLES ๐
wanna remove the text search template thesaurus? say less:
DROP TEXT SEARCH TEMPLATE thesaurus;
โ ๏ธ heads up bestie: this command will not succeed if there are any existing text search dictionaries that use the template. add CASCADE to drop such dictionaries along with the template. no cap.
โญ COMPATIBILITY โญ
there is no DROP TEXT SEARCH TEMPLATE statement in the SQL standard. so like, it's a PostgreSQL thing, not a universal thing. iykyk. ๐คทโโ๏ธ
๐ SEE ALSO ๐
ALTER TEXT SEARCH TEMPLATE(ALTER_TEXT_SEARCH_TEMPLATE(7))CREATE TEXT SEARCH TEMPLATE(CREATE_TEXT_SEARCH_TEMPLATE(7))
and that's the whole page, bestie!! ๐ this was PostgreSQL 18.6 documentation, dated 2026, and yes we are absolutely slaying the text search template cleanup. now go forth and drop responsibly ๐งโจ
๐ฆ where this page comes from
- opensuse-leap 16.0: postgresql18 18.6-160000.1.1 ยท PostgreSQL
- opensuse-leap 16.0: postgresql18 18.6-160000.1.1 ยท PostgreSQL
- opensuse-leap 16.0: postgresql18 18.6-160000.1.1 ยท PostgreSQL
- opensuse-leap 16.0: postgresql18 18.6-160000.1.1 ยท PostgreSQL
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms