DROP_CAST(7pg15)
π NAME π
DROP_CAST β remove a cast. yes bestie, we are literally removing a cast that was previously defined. π«Ά
okay so this is the DROP CAST page, manual name 7pg15, from the PostgreSQL 15.19 docs. letβs get into it β¨
β¨ SYNOPSIS β¨
DROP CAST [ IF EXISTS ] (source_type AS target_type) [ CASCADE | RESTRICT ]
π¦ DESCRIPTION π¦
DROP CAST removes a previously defined cast. no cap. π
To be able to drop a cast, you must own the source or the target data type. these are the same privileges that are required to create a cast. so yeah, ownership check first, bestie. π
π PARAMETERS π
IF EXISTSβ do not throw an error if the cast does not exist. a notice is issued in this case. so itβs like βhey, there was nothing thereβ but not a whole error situation πsource_typeβ the name of the source data type of the cast. πtarget_typeβ the name of the target data type of the cast. πCASCADE,RESTRICTβ these key words do not have any effect, since there are no dependencies on casts. literally no effect. they are just vibing. π
πΈ EXAMPLES πΈ
to drop the cast from type text to type int, youβd run:
DROP CAST (text AS int);
π₯ COMPATIBILITY π₯
the DROP CAST command conforms to the SQL standard. slay. π
π SEE ALSO π
CREATE CAST (CREATE_CAST(7)) β go check that out if you wanna make a cast instead, iykyk. π§
okay thatβs the whole page β source/version is PostgreSQL 15.19, date is 2026, and this is the DROP CAST(7) manual page. bye bestie, mwah πβ¨
π¦ where this page comes from
- opensuse-leap 16.0: postgresql15 15.19-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql15 15.19-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql15 15.19-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql15 15.19-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