{
    "mode": "man",
    "parameter": "DROP_CAST",
    "section": "7",
    "url": "https://www.chedong.com/phpMan.php/man/DROP_CAST/7/json",
    "generated": "2026-05-30T05:14:32Z",
    "synopsis": "DROP CAST [ IF EXISTS ] (sourcetype AS targettype) [ CASCADE | RESTRICT ]",
    "sections": {
        "NAME": {
            "content": "DROPCAST - remove a cast\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "DROP CAST [ IF EXISTS ] (sourcetype AS targettype) [ CASCADE | RESTRICT ]\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "DROP CAST removes a previously defined cast.\n\nTo be able to drop a cast, you must own the source or the target data type. These are the\nsame privileges that are required to create a cast.\n",
            "subsections": []
        },
        "PARAMETERS": {
            "content": "IF EXISTS\nDo not throw an error if the cast does not exist. A notice is issued in this case.\n\nsourcetype\nThe name of the source data type of the cast.\n\ntargettype\nThe name of the target data type of the cast.\n\nCASCADE\nRESTRICT\nThese key words do not have any effect, since there are no dependencies on casts.\n",
            "subsections": []
        },
        "EXAMPLES": {
            "content": "To drop the cast from type text to type int:\n\nDROP CAST (text AS int);\n",
            "subsections": []
        },
        "COMPATIBILITY": {
            "content": "The DROP CAST command conforms to the SQL standard.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "CREATE CAST (CREATECAST(7))\n\n\n\nPostgreSQL 14.23                                2026                                    DROP CAST(7)",
            "subsections": []
        }
    },
    "summary": "DROPCAST - remove a cast",
    "flags": [],
    "examples": [
        "To drop the cast from type text to type int:",
        "DROP CAST (text AS int);"
    ],
    "see_also": [
        {
            "name": "CREATECAST",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/CREATECAST/7/json"
        },
        {
            "name": "CAST",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/CAST/7/json"
        }
    ]
}