{
    "mode": "man",
    "parameter": "ALTER_TRIGGER",
    "section": "7",
    "url": "https://www.chedong.com/phpMan.php/man/ALTER_TRIGGER/7/json",
    "generated": "2026-10-07T21:06:30Z",
    "synopsis": "ALTER TRIGGER name ON tablename RENAME TO newname\nALTER TRIGGER name ON tablename [ NO ] DEPENDS ON EXTENSION extensionname",
    "sections": {
        "NAME": {
            "content": "ALTERTRIGGER - change the definition of a trigger\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "ALTER TRIGGER name ON tablename RENAME TO newname\nALTER TRIGGER name ON tablename [ NO ] DEPENDS ON EXTENSION extensionname\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "ALTER TRIGGER changes properties of an existing trigger.\n\nThe RENAME clause changes the name of the given trigger without otherwise changing the\ntrigger definition. If the table that the trigger is on is a partitioned table, then\ncorresponding clone triggers in the partitions are renamed too.\n\nThe DEPENDS ON EXTENSION clause marks the trigger as dependent on an extension, such that if\nthe extension is dropped, the trigger will automatically be dropped as well.\n\nYou must own the table on which the trigger acts to be allowed to change its properties.\n",
            "subsections": []
        },
        "PARAMETERS": {
            "content": "name\nThe name of an existing trigger to alter.\n\ntablename\nThe name of the table on which this trigger acts.\n\nnewname\nThe new name for the trigger.\n\nextensionname\nThe name of the extension that the trigger is to depend on (or no longer dependent on, if\nNO is specified). A trigger that's marked as dependent on an extension is automatically\ndropped when the extension is dropped.\n",
            "subsections": []
        },
        "NOTES": {
            "content": "The ability to temporarily enable or disable a trigger is provided by ALTER TABLE, not by\nALTER TRIGGER, because ALTER TRIGGER has no convenient way to express the option of enabling\nor disabling all of a table's triggers at once.\n",
            "subsections": []
        },
        "EXAMPLES": {
            "content": "To rename an existing trigger:\n\nALTER TRIGGER empstamp ON emp RENAME TO emptrackchgs;\n\nTo mark a trigger as being dependent on an extension:\n\nALTER TRIGGER empstamp ON emp DEPENDS ON EXTENSION emplib;\n",
            "subsections": []
        },
        "COMPATIBILITY": {
            "content": "ALTER TRIGGER is a PostgreSQL extension of the SQL standard.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "ALTER TABLE (ALTERTABLE(7))\n\nPostgreSQL 16.14                                2026                                ALTER TRIGGER(7)",
            "subsections": []
        }
    },
    "summary": "ALTERTRIGGER - change the definition of a trigger",
    "flags": [],
    "examples": [
        "To rename an existing trigger:",
        "ALTER TRIGGER empstamp ON emp RENAME TO emptrackchgs;",
        "To mark a trigger as being dependent on an extension:",
        "ALTER TRIGGER empstamp ON emp DEPENDS ON EXTENSION emplib;"
    ],
    "see_also": [
        {
            "name": "ALTERTABLE",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/ALTERTABLE/7/json"
        },
        {
            "name": "TRIGGER",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/TRIGGER/7/json"
        }
    ]
}