DROP_TEXT_SEARCH_PARSER(7pg14)

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

πŸ’… DROP TEXT SEARCH PARSER (7) β€” the PostgreSQL 14.24 Documentation glow-up πŸŽ€

okay so bestie, quick vibe check: this page is called DROP TEXT SEARCH PARSER, it lives in the 7 section of the PostgreSQL 14.24 docs, and it's literally about yeeting a text search parser out of existence. iconic destructive behavior, we love to see it πŸ’–


✨ NAME ✨

DROP_TEXT_SEARCH_PARSER β€” remove a text search parser πŸ—‘οΈ


πŸ¦‹ SYNOPSIS πŸ¦‹

DROP TEXT SEARCH PARSER [ IF EXISTS ] name [ CASCADE | RESTRICT ]

look at her. short. powerful. a little menacing. πŸ’…


🌸 DESCRIPTION 🌸

DROP TEXT SEARCH PARSER drops an existing text search parser. that's the whole bit, no cap. it's giving "one job, does it well" energy πŸ‘‘

but hear me when i say this: you must be a superuser to use this command. like, actually. not everyone gets to press this button. superuser privileges or it's not happening, periodt πŸ”₯


πŸ’œ PARAMETERS πŸ’œ

  • IF EXISTS β€” don't throw an error if the text search parser doesn't exist. instead, a notice gets issued in that case. so it's like "girl, there was nothing there, but ok, we move" 🫢
  • name β€” the name of an existing text search parser. it can optionally be schema-qualified, so you can be all "no, the other one" if you need to πŸŽ€
  • 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 the domino effect, the whole chain reaction, the "you came for one thing and now everything's gone" special πŸ’€
  • RESTRICT β€” refuse to drop the text search parser if any objects depend on it. this is the default, so if you don't say anything, the parser is protected. she's guarded by default, as she should be 🌈

⭐ EXAMPLES ⭐

remove the text search parser my_parser:

DROP TEXT SEARCH PARSER my_parser;

heads up though β€” this command will not succeed if there are any existing text search configurations that use the parser. 😭 so if you're getting pushback, that's why. add CASCADE to drop such configurations along with the parser, and then it'll go through. bye bestie ✌️


🧚 COMPATIBILITY 🧚

there is no DROP TEXT SEARCH PARSER statement in the SQL standard. so this is a PostgreSQL-exclusive experience, iykyk πŸ’…βœ¨


🌈 SEE ALSO 🌈

go read those too, they're the prequel and the glow-up sequel to this one πŸ¦‹


okay that's the whole page bestie, you're officially parser-literate πŸŽ“πŸ’– this drop was brought to you by PostgreSQL 14.24, dated 2026, filed under DROP TEX...CH PARSER(7) β€” yes the header itself got truncated with an ellipsis, and honestly? relatable. she's mysterious. she's iconic. mwah πŸ˜˜πŸ‘‘

πŸ“¦ where this page comes from