DROP_TEXT_SEARCH_TEMPLATE(7pg13)
π 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 (seeSection 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 π
ALTER TEXT SEARCH TEMPLATE(ALTER_TEXT_SEARCH_TEMPLATE(7))CREATE TEXT SEARCH TEMPLATE(CREATE_TEXT_SEARCH_TEMPLATE(7))
πΈ 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
- opensuse-leap 16.0: postgresql13 13.23-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql13 13.23-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql13 13.23-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql13 13.23-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