{
    "content": [
        {
            "type": "text",
            "text": "# DROP_SCHEMA (man)\n\n## NAME\n\nDROPSCHEMA - remove a schema\n\n## SYNOPSIS\n\nDROP SCHEMA [ IF EXISTS ] name [, ...] [ CASCADE | RESTRICT ]\n\n## DESCRIPTION\n\nDROP SCHEMA removes schemas from the database.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **PARAMETERS**\n- **NOTES**\n- **EXAMPLES**\n- **COMPATIBILITY**\n- **SEE ALSO**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "DROP_SCHEMA",
        "section": "",
        "mode": "man",
        "summary": "DROPSCHEMA - remove a schema",
        "synopsis": "DROP SCHEMA [ IF EXISTS ] name [, ...] [ CASCADE | RESTRICT ]",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [
            "To remove schema mystuff from the database, along with everything it contains:",
            "DROP SCHEMA mystuff CASCADE;"
        ],
        "see_also": [
            {
                "name": "ALTERSCHEMA",
                "section": "7",
                "url": "https://www.chedong.com/phpMan.php/man/ALTERSCHEMA/7/json"
            },
            {
                "name": "CREATESCHEMA",
                "section": "7",
                "url": "https://www.chedong.com/phpMan.php/man/CREATESCHEMA/7/json"
            },
            {
                "name": "SCHEMA",
                "section": "7",
                "url": "https://www.chedong.com/phpMan.php/man/SCHEMA/7/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "PARAMETERS",
                "lines": 13,
                "subsections": []
            },
            {
                "name": "NOTES",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "EXAMPLES",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "COMPATIBILITY",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 5,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "DROPSCHEMA - remove a schema\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "DROP SCHEMA [ IF EXISTS ] name [, ...] [ CASCADE | RESTRICT ]\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "DROP SCHEMA removes schemas from the database.\n\nA schema can only be dropped by its owner or a superuser. Note that the owner can drop the\nschema (and thereby all contained objects) even if they do not own some of the objects within\nthe schema.\n",
                "subsections": []
            },
            "PARAMETERS": {
                "content": "IF EXISTS\nDo not throw an error if the schema does not exist. A notice is issued in this case.\n\nname\nThe name of a schema.\n\nCASCADE\nAutomatically drop objects (tables, functions, etc.) that are contained in the schema,\nand in turn all objects that depend on those objects (see Section 5.14).\n\nRESTRICT\nRefuse to drop the schema if it contains any objects. This is the default.\n",
                "subsections": []
            },
            "NOTES": {
                "content": "Using the CASCADE option might make the command remove objects in other schemas besides the\none(s) named.\n",
                "subsections": []
            },
            "EXAMPLES": {
                "content": "To remove schema mystuff from the database, along with everything it contains:\n\nDROP SCHEMA mystuff CASCADE;\n",
                "subsections": []
            },
            "COMPATIBILITY": {
                "content": "DROP SCHEMA is fully conforming with the SQL standard, except that the standard only allows\none schema to be dropped per command, and apart from the IF EXISTS option, which is a\nPostgreSQL extension.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "ALTER SCHEMA (ALTERSCHEMA(7)), CREATE SCHEMA (CREATESCHEMA(7))\n\n\n\nPostgreSQL 14.23                                2026                                  DROP SCHEMA(7)",
                "subsections": []
            }
        }
    }
}