DROP_CAST(7pg18)
๐ DROP CAST(7) โ the PostgreSQL 18.6 era, bestie
okay so this is the PostgreSQL 18.6 Documentation page for DROP CAST, and we're gonna make it make sense. no cap.
โจ NAME โจ
DROP_CAST โ remove a cast ๐ซถ
๐ธ SYNOPSIS ๐ธ
DROP CAST [ IF EXISTS ] (source_type AS target_type) [ CASCADE | RESTRICT ]
look at her. so clean. so simple. she's giving "one line, whole lotta power". ๐
๐ฆ DESCRIPTION ๐ฆ
DROP CAST removes a previously defined cast. that's it. that's the whole job. she's a deleter, not a creator. ๐
but bestie, listen โ to be able to drop a cast, you must own the source or the target data type. and here's the tea: those are the same privileges that are required to create a cast. so if you could make her, you can unmake her. it's giving symmetry. it's giving balance. โจ
not you having to actually own the type to do this... permissions really said "know your place" ๐ญ
๐ PARAMETERS ๐
IF EXISTSโ do not throw an error if the cast doesn't exist. instead, a notice is issued in this case. so like, she won't scream at you, she'll just quietly go "hmm, wasn't there anyway" ๐source_typeโ the name of the source data type of the cast. the "from" girlie. ๐target_typeโ the name of the target data type of the cast. the "to" girlie. ๐ฆCASCADERESTRICTโ okay so these key words do not have any effect, since there are no dependencies on casts. they're literally just here for the vibes. decorative. ornamental. icons doing nothing but looking cute. ๐โจ
๐ฅ EXAMPLES ๐ฅ
say you wanna drop the cast from type text to type int:
DROP CAST (text AS int);
periodt. done. she's gone. ๐
๐ COMPATIBILITY ๐
the DROP CAST command conforms to the SQL standard. she's certified. she's official. she passed the vibe check. โ
๐ SEE ALSO ๐
CREATE CAST (CREATE_CAST(7))
go make one, then come back and drop it. the full circle moment fr fr. ๐
mwah ๐ that was the whole page, bestie โ brought to you by PostgreSQL 18.6, dated 2026, and it's literally the same DROP CAST(7) energy from top to bottom. stay hydrated, back up your schemas, and never drop a cast you don't own. ๐ซถ๐ธ
๐ฆ where this page comes from
- opensuse-leap 16.0: postgresql18 18.6-160000.1.1 ยท PostgreSQL
- opensuse-leap 16.0: postgresql18 18.6-160000.1.1 ยท PostgreSQL
- opensuse-leap 16.0: postgresql18 18.6-160000.1.1 ยท PostgreSQL
- opensuse-leap 16.0: postgresql18 18.6-160000.1.1 ยท PostgreSQL
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms