{
    "mode": "man",
    "parameter": "ALTER_OPERATOR_CLASS",
    "section": "7",
    "url": "https://www.chedong.com/phpMan.php/man/ALTER_OPERATOR_CLASS/7/json",
    "generated": "2026-10-07T13:17:41Z",
    "synopsis": "ALTER OPERATOR CLASS name USING indexmethod\nRENAME TO newname\nALTER OPERATOR CLASS name USING indexmethod\nOWNER TO { newowner | CURRENTROLE | CURRENTUSER | SESSIONUSER }\nALTER OPERATOR CLASS name USING indexmethod\nSET SCHEMA newschema",
    "sections": {
        "NAME": {
            "content": "ALTEROPERATORCLASS - change the definition of an operator class\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "ALTER OPERATOR CLASS name USING indexmethod\nRENAME TO newname\n\nALTER OPERATOR CLASS name USING indexmethod\nOWNER TO { newowner | CURRENTROLE | CURRENTUSER | SESSIONUSER }\n\nALTER OPERATOR CLASS name USING indexmethod\nSET SCHEMA newschema\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "ALTER OPERATOR CLASS changes the definition of an operator class.\n\nYou must own the operator class to use ALTER OPERATOR CLASS. To alter the owner, you must be\nable to SET ROLE to the new owning role, and that role must have CREATE privilege on the\noperator class's schema. (These restrictions enforce that altering the owner doesn't do\nanything you couldn't do by dropping and recreating the operator class. However, a superuser\ncan alter ownership of any operator class anyway.)\n",
            "subsections": []
        },
        "PARAMETERS": {
            "content": "name\nThe name (optionally schema-qualified) of an existing operator class.\n\nindexmethod\nThe name of the index method this operator class is for.\n\nnewname\nThe new name of the operator class.\n\nnewowner\nThe new owner of the operator class.\n\nnewschema\nThe new schema for the operator class.\n",
            "subsections": []
        },
        "COMPATIBILITY": {
            "content": "There is no ALTER OPERATOR CLASS statement in the SQL standard.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "CREATE OPERATOR CLASS (CREATEOPERATORCLASS(7)), DROP OPERATOR CLASS\n(DROPOPERATORCLASS(7)), ALTER OPERATOR FAMILY (ALTEROPERATORFAMILY(7))\n\nPostgreSQL 16.14                                2026                         ALTER OPERATOR CLASS(7)",
            "subsections": []
        }
    },
    "summary": "ALTEROPERATORCLASS - change the definition of an operator class",
    "flags": [],
    "examples": [],
    "see_also": [
        {
            "name": "CREATEOPERATORCLASS",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/CREATEOPERATORCLASS/7/json"
        },
        {
            "name": "DROPOPERATORCLASS",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/DROPOPERATORCLASS/7/json"
        },
        {
            "name": "ALTEROPERATORFAMILY",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/ALTEROPERATORFAMILY/7/json"
        },
        {
            "name": "CLASS",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/CLASS/7/json"
        }
    ]
}