DROP_CAST(7pg13)
π DROP CAST (7pg13) β the "bye-bye cast" page β¨
okay so real quick, this is the DROP CAST(7) page from the PostgreSQL 13.23 Documentation, and bestie, it's lowkey short but it's all tea π«
π NAME π
DROP_CAST β remove a cast. literally just. yeet the cast. that's it. that's the whole job π
β¨ SYNOPSIS β¨
DROP CAST [ IF EXISTS ] (source_type AS target_type) [ CASCADE | RESTRICT ]
that's the whole vibe right there π
π¦ DESCRIPTION π¦
so DROP CAST removes a previously defined cast. gone. deleted. not me manifesting its downfall π
but here's the catch, and it's giving "you must have main character energy": to be able to drop a cast, you must own the source or the target data type. yep β those are the exact same privileges that are required to create a cast. same keys, different door ποΈ
πΈ PARAMETERS πΈ
IF EXISTSβ Do not throw an error if the cast does not exist. A notice is issued in this case. like, no drama, no error, just a lil notice to let you know π«Άsource_typeβ The name of the source data type of the cast. the from. the origin story π±target_typeβ The name of the target data type of the cast. the to. the glow-up destination π¦CASCADE,RESTRICTβ These key words do not have any effect, since there are no dependencies on casts. yeah they're just kinda there. decorative. iconique but useless, we stan anyway π
π₯ EXAMPLES π₯
to drop the cast from type text to type int, you hit it with:
DROP CAST (text AS int);
and it's done. no cap β¨
β COMPATIBILITY β
The DROP CAST command conforms to the SQL standard. standards girlie behavior, we love to see it π
π SEE ALSO π
CREATE CAST (CREATE_CAST(7)) β the origin story, the prequel, go read it π§
and that's the whole page bestie π that was PostgreSQL 13.23, dated 2025, DROP CAST(7), signing off β go drop those casts, you absolute monarch ππ
π¦ where this page comes from
- opensuse-leap 16.0: postgresql13 13.23-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql13 13.23-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql13 13.23-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql13 13.23-160000.1.1 Β· PostgreSQL
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms