DROP_TEXT_SEARCH_PARSER(7pg16)

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

πŸ’… 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 πŸ’€

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