{
    "content": [
        {
            "type": "text",
            "text": "# ALTER_SCHEMA (man)\n\n## NAME\n\nALTERSCHEMA - change the definition of a schema\n\n## SYNOPSIS\n\nALTER SCHEMA name RENAME TO newname\nALTER SCHEMA name OWNER TO { newowner | CURRENTROLE | CURRENTUSER | SESSIONUSER }\n\n## DESCRIPTION\n\nALTER SCHEMA changes the definition of a schema.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **PARAMETERS**\n- **COMPATIBILITY**\n- **SEE ALSO**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "ALTER_SCHEMA",
        "section": "",
        "mode": "man",
        "summary": "ALTERSCHEMA - change the definition of a schema",
        "synopsis": "ALTER SCHEMA name RENAME TO newname\nALTER SCHEMA name OWNER TO { newowner | CURRENTROLE | CURRENTUSER | SESSIONUSER }",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [
            {
                "name": "CREATESCHEMA",
                "section": "7",
                "url": "https://www.chedong.com/phpMan.php/man/CREATESCHEMA/7/json"
            },
            {
                "name": "DROPSCHEMA",
                "section": "7",
                "url": "https://www.chedong.com/phpMan.php/man/DROPSCHEMA/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": 3,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 7,
                "subsections": []
            },
            {
                "name": "PARAMETERS",
                "lines": 10,
                "subsections": []
            },
            {
                "name": "COMPATIBILITY",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 5,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "ALTERSCHEMA - change the definition of a schema\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "ALTER SCHEMA name RENAME TO newname\nALTER SCHEMA name OWNER TO { newowner | CURRENTROLE | CURRENTUSER | SESSIONUSER }\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "ALTER SCHEMA changes the definition of a schema.\n\nYou must own the schema to use ALTER SCHEMA. To rename a schema you must also have the CREATE\nprivilege for the database. To alter the owner, you must also be a direct or indirect member\nof the new owning role, and you must have the CREATE privilege for the database. (Note that\nsuperusers have all these privileges automatically.)\n",
                "subsections": []
            },
            "PARAMETERS": {
                "content": "name\nThe name of an existing schema.\n\nnewname\nThe new name of the schema. The new name cannot begin with pg, as such names are\nreserved for system schemas.\n\nnewowner\nThe new owner of the schema.\n",
                "subsections": []
            },
            "COMPATIBILITY": {
                "content": "There is no ALTER SCHEMA statement in the SQL standard.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "CREATE SCHEMA (CREATESCHEMA(7)), DROP SCHEMA (DROPSCHEMA(7))\n\n\n\nPostgreSQL 14.23                                2026                                 ALTER SCHEMA(7)",
                "subsections": []
            }
        }
    }
}