{
    "mode": "man",
    "parameter": "DROP_FOREIGN_DATA_WRAPPER",
    "section": "7",
    "url": "https://www.chedong.com/phpMan.php/man/DROP_FOREIGN_DATA_WRAPPER/7/json",
    "generated": "2026-07-05T11:50:35Z",
    "synopsis": "DROP FOREIGN DATA WRAPPER [ IF EXISTS ] name [, ...] [ CASCADE | RESTRICT ]",
    "sections": {
        "NAME": {
            "content": "DROPFOREIGNDATAWRAPPER - remove a foreign-data wrapper\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "DROP FOREIGN DATA WRAPPER [ IF EXISTS ] name [, ...] [ CASCADE | RESTRICT ]\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "DROP FOREIGN DATA WRAPPER removes an existing foreign-data wrapper. To execute this command,\nthe current user must be the owner of the foreign-data wrapper.\n",
            "subsections": []
        },
        "PARAMETERS": {
            "content": "IF EXISTS\nDo not throw an error if the foreign-data wrapper does not exist. A notice is issued in\nthis case.\n\nname\nThe name of an existing foreign-data wrapper.\n\nCASCADE\nAutomatically drop objects that depend on the foreign-data wrapper (such as foreign\ntables and servers), and in turn all objects that depend on those objects (see\nSection 5.14).\n\nRESTRICT\nRefuse to drop the foreign-data wrapper if any objects depend on it. This is the default.\n",
            "subsections": []
        },
        "EXAMPLES": {
            "content": "Drop the foreign-data wrapper dbi:\n\nDROP FOREIGN DATA WRAPPER dbi;\n",
            "subsections": []
        },
        "COMPATIBILITY": {
            "content": "DROP FOREIGN DATA WRAPPER conforms to ISO/IEC 9075-9 (SQL/MED). The IF EXISTS clause is a\nPostgreSQL extension.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "CREATE FOREIGN DATA WRAPPER (CREATEFOREIGNDATAWRAPPER(7)), ALTER FOREIGN DATA WRAPPER\n(ALTERFOREIGNDATAWRAPPER(7))\n\n\n\nPostgreSQL 14.23                                2026                    DROP FOREIGN DATA WRAPPER(7)",
            "subsections": []
        }
    },
    "summary": "DROPFOREIGNDATAWRAPPER - remove a foreign-data wrapper",
    "flags": [],
    "examples": [
        "Drop the foreign-data wrapper dbi:",
        "DROP FOREIGN DATA WRAPPER dbi;"
    ],
    "see_also": [
        {
            "name": "CREATEFOREIGNDATAWRAPPER",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/CREATEFOREIGNDATAWRAPPER/7/json"
        },
        {
            "name": "ALTERFOREIGNDATAWRAPPER",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/ALTERFOREIGNDATAWRAPPER/7/json"
        },
        {
            "name": "WRAPPER",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/WRAPPER/7/json"
        }
    ]
}