DROP_TEXT_SEARCH_PARSER(7pg16)
π DROP TEXT SEARCH PARSER π
okay so bestie, welcome to the <pink>DROP TEXT SEARCH PARSER</pink> page β that's section 7 of the <purple>PostgreSQL 16.15 Documentation</purple> for the record, and yes we're doing this, it's giving "cleaning out the closet but the closet is full of parsers" π§Ήβ¨
πΈ NAME πΈ
DROP_TEXT_SEARCH_PARSER β literally just: remove a text search parser. that's the whole vibe. bye parser π
π¦ SYNOPSIS π¦
DROP TEXT SEARCH PARSER [ IF EXISTS ] name [ CASCADE | RESTRICT ]
look at her. short, iconic, no notes π
π DESCRIPTION π
so DROP TEXT SEARCH PARSER drops an existing text search parser. gone. deleted. not me being emotional about it π
β οΈ important bestie: you must be a superuser to use this command. like, actual superuser. no cap. if you're not, this is not your moment π
β¨ PARAMETERS β¨
IF EXISTSβ do not throw an error if the text search parser doesn't exist. instead a notice gets issued. it's the "no worries, we move" flag π«Άnameβ the name of an existing text search parser, and yes it can be optionally schema-qualified πCASCADEβ automatically drop objects that depend on the text search parser, and in turn all objects that depend on those objects (see Section 5.14). it's giving domino effect π₯RESTRICTβ refuse to drop the text search parser if any objects depend on it. and guess what β this is the default. she's cautious, she's responsible, we stan π
π EXAMPLES π
remove the text search parser my_parser:
DROP TEXT SEARCH PARSER my_parser;
okay but heads up π«£ β this command will not succeed if there are any existing text search configurations that use the parser. so if you're getting that error, just add CASCADE to drop such configurations along with the parser. problem solved, slay π
β¨
π COMPATIBILITY π
there is no DROP TEXT SEARCH PARSER statement in the SQL standard. so like... we're built different, iykyk π€·ββοΈ
π SEE ALSO π
ALTER TEXT SEARCH PARSER(ALTER_TEXT_SEARCH_PARSER(7))CREATE TEXT SEARCH PARSER(CREATE_TEXT_SEARCH_PARSER(7))
go read those too, they're lowkey essential π
mwah π that's the whole page! this little icon was brought to you by <purple>PostgreSQL 16.15</purple>, dated <cyan>2026</cyan>, filed under DROP TEX...CH PARSER(7) β take care of her, she's famous πππ¦
π¦ where this page comes from
- opensuse-leap 16.0: postgresql16 16.15-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql16 16.15-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql16 16.15-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql16 16.15-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