DROP_TRANSFORM(7pg18)

๐Ÿ“ฆ version 18.6, in opensuse-leap 16.0

๐Ÿ’… DROP_TRANSFORM โ€” bestie, it's time to say bye to that transform

okay so real talk, this is a PostgreSQL 18.6 manual page, it lives in section 7 of the docs, and it's all about yeeting a transform you made earlier. let's get into it ๐ŸŽ€


โœจ NAME โœจ

DROP_TRANSFORM โ€” literally just: remove a transform ๐Ÿฆ‹


โœจ SYNOPSIS โœจ

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

โœจ DESCRIPTION โœจ

so DROP TRANSFORM does exactly what it says on the tin: it removes a previously defined transform. gone. deleted. no more. ๐Ÿซถ

but here's the vibe check ๐Ÿ‘‘ โ€” to be able to drop a transform, you must own the type and the language. yes, both. and guess what? those are the exact same privileges you needed to create a transform in the first place. so if you made it, you can unmake it. iconic symmetry honestly.


โœจ PARAMETERS โœจ

  • IF EXISTS โ€” do not throw an error if the transform doesn't exist. instead a notice gets issued in this case. basically the "no worries if not" of SQL ๐Ÿ’–
  • type_name โ€” the name of the data type of the transform.
  • 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.15). it's giving domino effect fr fr ๐Ÿ”ฅ
  • RESTRICT โ€” refuse to drop the transform if any objects depend on it. this is the default, so if you don't say anything, this is what you get.
โš ๏ธ okay bestie listen โ€” CASCADE doesn't just drop the one thing. it takes out everything downstream too. chain reaction energy. know what you're deleting before you delete it ๐Ÿ’€

โœจ EXAMPLES โœจ

to drop the transform for type hstore and language plpython3u:

DROP TRANSFORM FOR hstore LANGUAGE plpython3u;

clean, simple, one line, ate ๐Ÿ’…


โœจ COMPATIBILITY โœจ

ngl, this form of DROP TRANSFORM is a PostgreSQL extension โ€” it's not part of the standard. for the full tea, go check CREATE TRANSFORM (CREATE_TRANSFORM(7)) ๐ŸŒธ


โœจ SEE ALSO โœจ


okay that's the whole page, you're officially a DROP_TRANSFORM girly now ๐Ÿงš

this was brought to you by PostgreSQL 18.6, dated 2026, page DROP TRANSFORM(7) โ€” mwah, go forth and drop responsibly ๐Ÿ’–โœจ๐ŸŽ€

๐Ÿ“ฆ where this page comes from