DROP_CAST(7pg17)
π NAME π
okay so this is the DROP CAST page (manual name DROP CAST(7pg17), PostgreSQL 17.11 docs): DROP_CAST β remove a cast. Bestie, it's literally the "delete this cast" command. Periodt.
β¨ SYNOPSIS β¨
DROP CAST [ IF EXISTS ] (source_type AS target_type) [ CASCADE | RESTRICT ]
π«Ά DESCRIPTION π«Ά
okay so DROP CAST removes a cast that was previously defined. It's giving cleanup era, and we love that for you.
To be able to drop a cast, you must own the source data type or the target data type. These are the same privileges that are required to create a cast. No cap, permissions are the whole vibe here.
π 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 a lil "hey bestie, nothing to drop" message.source_typeβ the name of the source data type of the cast. The "from" side, iykyk.target_typeβ the name of the target data type of the cast. The "to" side. πCASCADEβ this key word does not have any effect, since there are no dependencies on casts. It's iconic but lowkey doing nothing.RESTRICTβ same energy: this key word does not have any effect, since there are no dependencies on casts.
π EXAMPLES π
To drop the cast from type text to type int:
DROP CAST (text AS int);
π COMPATIBILITY π
The DROP CAST command conforms to the SQL standard. Standards-compliant and unbothered. β¨
π¦ SEE ALSO π¦
CREATE CAST(CREATE_CAST(7)) β the make-it version.
mwah π that's the whole page, bestie. This page is from the PostgreSQL 17.11 documentation, dated 2026 β DROP CAST(7), signing off π
β¨
π¦ where this page comes from
- opensuse-leap 16.0: postgresql17 17.11-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql17 17.11-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql17 17.11-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql17 17.11-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