DROP_TEXT_SEARCH_PARSER(7pg13)

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

✨ NAME ✨

DROP_TEXT_SEARCH_PARSER(7pg13) β€” okay so this page is literally about how to remove a text search parser. That's the whole assignment, bestie. πŸ’…

🌸 SYNOPSIS 🌸

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

πŸ’– DESCRIPTION πŸ’–

DROP TEXT SEARCH PARSER drops an existing text search parser. It's giving "delete that parser" energy. You must be a superuser to use this command β€” no cap, that part is non-negotiable. πŸ‘‘

πŸŽ€ PARAMETERS πŸŽ€

  • IF EXISTS β€” don't throw an error if the text search parser does not exist. In that case, a notice is issued instead. So it's like, "bestie, she's already gone," and the command keeps it moving. ✨
  • name β€” the name (optionally schema-qualified) of an existing text search parser. This is the parser you're trying to drop, iykyk. 🎯
  • 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). Full domino-effect behavior. 🁒
  • RESTRICT β€” refuse to drop the text search parser if any objects depend on it. This is the default. So if you don't say CASCADE, this is the vibe you get. πŸ›‘
  • name β€” the name (optionally schema-qualified) of an existing text search parser. Wait, yes, it's listed again in the original source's parameter flow, so here it is again, bestie. Don't come for me. 🫢

πŸ¦‹ EXAMPLES πŸ¦‹

Remove the text search parser my_parser:

DROP TEXT SEARCH PARSER my_parser;

This command will not succeed if there are any existing text search configurations that use the parser. Add CASCADE to drop such configurations along with the parser. Like, she will not go quietly unless you let the cascade do its thing. 😭

⭐ COMPATIBILITY ⭐

There is no DROP TEXT SEARCH PARSER statement in the SQL standard. So this one is PostgreSQL-exclusive behavior, fr fr. πŸ’«

πŸ‘‘ SEE ALSO πŸ‘‘


Source/version vibes: PostgreSQL 13.23 Documentation, dated 2025. That's the cute little sign-off, bestie β€” mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from