DROP_TRANSFORM(7pg13)

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

πŸ’… DROP_TRANSFORM πŸ’…

ok so bestie, welcome to DROP TRANSFORM(7) β€” straight outta the PostgreSQL 13.23 Documentation. this is the page where we learn how to yeet a transform into the void. let's get into it 🫢


✨ NAME ✨

DROP_TRANSFORM β€” remove a transform. that's it. that's the whole vibe. πŸ’€


🌸 SYNOPSIS 🌸

DROP TRANSFORM [ IF EXISTS ] FOR type_name LANGUAGE lang_name [ CASCADE | RESTRICT ]

like, look at her. so clean. so structured. main character energy fr fr πŸ‘‘


πŸ¦‹ DESCRIPTION πŸ¦‹

DROP TRANSFORM removes a previously defined transform. that's the whole job, and honestly? she ate. ✨

but okay, plot twist β€” there's a vibe check before you can drop one: you must own the type and the language. yep, both. these are literally the same privileges you'd need to create a transform in the first place, so if you built it, you can destroy it. no cap. πŸ”₯


πŸŽ€ PARAMETERS πŸŽ€

  • IF EXISTS β€” do not throw an error if the transform does not exist. instead, a notice is issued in this case. so it's like, nice about it. πŸ₯Ί
  • type_name β€” the name of the data type of the transform. iykyk 🧚
  • lang_name β€” the name of the language of the transform. πŸ’œ
  • CASCADE β€” automatically drop objects that depend on the transform, and in turn all objects that depend on those objects (see Section 5.14). it's giving chain reaction, lowkey iconic 🌈
  • RESTRICT β€” refuse to drop the transform if any objects depend on it. this is the default. she's cautious. she's careful. she's protecting you from yourself πŸ™ˆ
⚠️ okay so real talk: that CASCADE situation is not a drill. it takes out everything that depends on the transform, and then everything depending on those objects. read Section 5.14 before you go feral with it, bestie πŸ’€

🌟 EXAMPLES 🌟

so if you wanted to drop the transform for type hstore and language plpythonu, you'd literally just do this:

DROP TRANSFORM FOR hstore LANGUAGE plpythonu;

periodt. done. slay. πŸ’…


⭐ COMPATIBILITY ⭐

this form of DROP TRANSFORM is a PostgreSQL extension. so like, don't expect other databases to get the assignment 😭 see CREATE TRANSFORM (CREATE_TRANSFORM(7)) for details.


πŸ“ SEE ALSO πŸ“


okay that's the whole page, bestie! go forth and drop responsibly πŸ¦‹

sign-off city: this was PostgreSQL 13.23, dated 2025, and the title is DROP TRANSFORM(7) β€” mwah, love u, bye πŸ’–πŸŽ€βœ¨

πŸ“¦ where this page comes from