{"Entry":{"collection":"sql","key":"alter-trigger","name":"ALTER TRIGGER","aliases":["altertrigger"],"metadata":{"aliases":["altertrigger"],"changed_in":["7.4","9.0","9.2","9.6","13"],"changes":[{"from":"7.2","purpose_changed":false,"renamed":null,"sections":{"added":[],"changed":[],"removed":[]},"status":"added","synopsis":null,"to":"7.3"},{"from":"7.3","purpose_changed":false,"renamed":null,"sections":{"added":["parameters","examples"],"changed":["description","compatibility"],"removed":["usage"]},"status":"changed","synopsis":{"added":["ALTER TRIGGER name ON table RENAME TO newname"],"removed":["ALTER TRIGGER trigger ON table"]},"to":"7.4"},{"from":"8.0","purpose_changed":false,"renamed":null,"sections":{"added":["notes","see_also"],"changed":[],"removed":[]},"status":"changed","synopsis":null,"to":"8.1"},{"from":"8.4","purpose_changed":false,"renamed":null,"sections":{"added":[],"changed":["parameters"],"removed":[]},"status":"changed","synopsis":{"added":["ALTER TRIGGER name ON table RENAME TO new_name"],"removed":["ALTER TRIGGER name ON table RENAME TO newname"]},"to":"9.0"},{"from":"9.1","purpose_changed":false,"renamed":null,"sections":{"added":[],"changed":["parameters"],"removed":[]},"status":"changed","synopsis":{"added":["ALTER TRIGGER name ON table_name RENAME TO new_name"],"removed":["ALTER TRIGGER name ON table RENAME TO new_name"]},"to":"9.2"},{"from":"9.5","purpose_changed":false,"renamed":null,"sections":{"added":[],"changed":["description","parameters","examples"],"removed":[]},"status":"changed","synopsis":{"added":["ALTER TRIGGER name ON table_name DEPENDS ON EXTENSION extension_name"],"removed":[]},"to":"9.6"},{"from":"12","purpose_changed":false,"renamed":null,"sections":{"added":[],"changed":["parameters"],"removed":[]},"status":"changed","synopsis":{"added":["ALTER TRIGGER name ON table_name [ NO ] DEPENDS ON EXTENSION extension_name"],"removed":[]},"to":"13"},{"from":"14","purpose_changed":false,"renamed":null,"sections":{"added":[],"changed":["description"],"removed":[]},"status":"changed","synopsis":null,"to":"15"}],"content_hash":"831c97d9d428a8a0e500930eb3a0c568ac329bfb005c0b421bbb2df9c2975f0b","derived_content_hash":"b2968ea4b7ba7242680ac4378076fedf89f8489f6659f6635cc7d9fa60d3f7b3","editorial":{},"first_version":"7.3","group":"trigger","imported_at":"2026-09-30T17:43:38.474575+08:00","last_version":"20","name":"ALTER TRIGGER","object":"TRIGGER","position":6008,"present_in":["7.3","7.4","8.0","8.1","8.2","8.3","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6","10","11","12","13","14","15","16","17","18","19","20"],"purpose":"change the definition of a trigger","purpose_zh":"","related":["alter-table"],"repair_provenance":{"original_source_revision":"wiki-repair-20261023:4c87d916d551452958195ae19830244a757f786a75c9aa39538c7b03e758f47f","receipt_sha256":"362ba4b4f45110d71815e24f39b0b858bf8840d6e584fe7cc00bd024c09f4ac2","repair":"wiki-repair-20261023"},"slug":"alter-trigger","source_rev":"wiki-repair-20261023:f88544372b12dcc3fa6f653c441c93c803d1b4a2221227f803f207f54aaa83bb","synopsis":"ALTER TRIGGER name ON table_name RENAME TO new_name\nALTER TRIGGER name ON table_name [ NO ] DEPENDS ON EXTENSION extension_name","verb":"ALTER"}},"Definition":{"Collection":"sql","Key":"alter-trigger","SourceDatabase":"center","Version":"18","SourceTable":"sqlcmd","SourceKey":"alter-trigger","SourceRevision":"wiki-repair-20261023:f88544372b12dcc3fa6f653c441c93c803d1b4a2221227f803f207f54aaa83bb","Facts":{"anchor":"SQL-ALTERTRIGGER","description_zh":"更改触发器的定义","description_zh_html":"\u003cpre\u003eALTER TRIGGER name ON table_name RENAME TO new_name\nALTER TRIGGER name ON table_name [ NO ] DEPENDS ON EXTENSION extension_name\u003c/pre\u003e\u003csection\u003e\u003ch2\u003e描述\u003c/h2\u003e\u003cp\u003e\n\u003ccode class=\"command\"\u003eALTER TRIGGER\u003c/code\u003e 更改现有触发器的属性。\n  \u003c/p\u003e\u003cp\u003e\n\u003ccode class=\"literal\"\u003eRENAME\u003c/code\u003e 子句更改给定触发器的名称，而不改变该触发器定义的其他部分。如果该触发器所在的表是分区表，则各分区中的对应克隆触发器也会一并重命名。\n  \u003c/p\u003e\u003cp\u003e\n\u003ccode class=\"literal\"\u003eDEPENDS ON EXTENSION\u003c/code\u003e 子句将触发器标记为依赖于某个扩展，这样在删除该扩展时，该触发器也会自动删除。\n  \u003c/p\u003e\u003cp\u003e\n   若要更改触发器的属性，你必须拥有该触发器所作用的表。\n  \u003c/p\u003e\u003c/section\u003e\u003csection\u003e\u003ch2\u003e参数\u003c/h2\u003e\u003cdiv class=\"variablelist\"\u003e\u003cdl class=\"variablelist\"\u003e\u003cdt id=\"ZH18-AUTO-ALTER_TRIGGER-VARLISTENTRY-1\"\u003e\u003cspan class=\"term\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e \u003c/dt\u003e\u003cdd\u003e\u003cp\u003e\n      要修改的现有触发器的名称。\n     \u003c/p\u003e\u003c/dd\u003e\u003cdt id=\"ZH18-AUTO-ALTER_TRIGGER-VARLISTENTRY-2\"\u003e\u003cspan class=\"term\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003etable_name\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e \u003c/dt\u003e\u003cdd\u003e\u003cp\u003e\n      该触发器所作用的表的名称。\n     \u003c/p\u003e\u003c/dd\u003e\u003cdt id=\"ZH18-AUTO-ALTER_TRIGGER-VARLISTENTRY-3\"\u003e\u003cspan class=\"term\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003enew_name\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e \u003c/dt\u003e\u003cdd\u003e\u003cp\u003e\n      该触发器的新名称。\n     \u003c/p\u003e\u003c/dd\u003e\u003cdt id=\"ZH18-AUTO-ALTER_TRIGGER-VARLISTENTRY-4\"\u003e\u003cspan class=\"term\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003eextension_name\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e \u003c/dt\u003e\u003cdd\u003e\u003cp\u003e\n      该触发器要依赖的扩展名称（如果指定了 \u003ccode class=\"literal\"\u003eNO\u003c/code\u003e，则表示不再依赖该扩展）。被标记为依赖于扩展的触发器会在该扩展被删除时自动删除。\n     \u003c/p\u003e\u003c/dd\u003e\u003c/dl\u003e\u003c/div\u003e\u003c/section\u003e\u003csection\u003e\u003ch2\u003e注解\u003c/h2\u003e\u003cp\u003e\n    暂时启用或禁用触发器的功能由 \u003ca class=\"link\" href=\"/zh/docs/18/sql-altertable.html\" title=\"ALTER TABLE\"\u003e\u003ccode class=\"command\"\u003eALTER TABLE\u003c/code\u003e\u003c/a\u003e 提供，而不是\n    \u003ccode class=\"command\"\u003eALTER TRIGGER\u003c/code\u003e，因为 \u003ccode class=\"command\"\u003eALTER TRIGGER\u003c/code\u003e 没有方便的方式来表达一次性启用或禁用一个表上全部触发器这一选项。\n   \u003c/p\u003e\u003c/section\u003e\u003csection\u003e\u003ch2\u003e示例\u003c/h2\u003e\u003cp\u003e\n   要重命名一个现有触发器：\n\u003c/p\u003e\u003cpre class=\"programlisting\"\u003e\nALTER TRIGGER emp_stamp ON emp RENAME TO emp_track_chgs;\n\u003c/pre\u003e\u003cp\u003e\n   要将一个触发器标记为依赖于某个扩展：\n\u003c/p\u003e\u003cpre class=\"programlisting\"\u003e\nALTER TRIGGER emp_stamp ON emp DEPENDS ON EXTENSION emplib;\n\u003c/pre\u003e\u003c/section\u003e\u003csection\u003e\u003ch2\u003e兼容性\u003c/h2\u003e\u003cp\u003e\n\u003ccode class=\"command\"\u003eALTER TRIGGER\u003c/code\u003e 是\n   \u003cspan class=\"productname\"\u003ePostgreSQL\u003c/span\u003e 对 SQL 标准的扩展。\n  \u003c/p\u003e\u003c/section\u003e\u003csection\u003e\u003ch2\u003e另见\u003c/h2\u003e\u003cspan class=\"simplelist\"\u003e\u003ca class=\"xref\" href=\"/zh/docs/18/sql-altertable.html\" title=\"ALTER TABLE\"\u003e\u003cspan class=\"refentrytitle\"\u003eALTER TABLE\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e\u003c/section\u003e","file":"sql-altertrigger.html","lang":"en","name":"ALTER TRIGGER","purpose":"change the definition of a trigger","purpose_zh":"更改触发器的定义","related":["alter-table"],"sections":[{"html":"\u003cp\u003e\u003ccode class=\"command\"\u003eALTER TRIGGER\u003c/code\u003e changes properties of an existing trigger.\u003c/p\u003e\u003cp\u003eThe \u003ccode class=\"literal\"\u003eRENAME\u003c/code\u003e clause changes the name of the given trigger without otherwise changing the trigger definition. If the table that the trigger is on is a partitioned table, then corresponding clone triggers in the partitions are renamed too.\u003c/p\u003e\u003cp\u003eThe \u003ccode class=\"literal\"\u003eDEPENDS ON EXTENSION\u003c/code\u003e clause marks the trigger as dependent on an extension, such that if the extension is dropped, the trigger will automatically be dropped as well.\u003c/p\u003e\u003cp\u003eYou must own the table on which the trigger acts to be allowed to change its properties.\u003c/p\u003e","key":"description","title":"Description"},{"html":"\u003cdiv class=\"variablelist\"\u003e\u003cdl class=\"variablelist\"\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eThe name of an existing trigger to alter.\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003etable_name\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eThe name of the table on which this trigger acts.\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003enew_name\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eThe new name for the trigger.\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003eextension_name\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eThe name of the extension that the trigger is to depend on (or no longer dependent on, if \u003ccode class=\"literal\"\u003eNO\u003c/code\u003e is specified). A trigger that's marked as dependent on an extension is automatically dropped when the extension is dropped.\u003c/p\u003e\u003c/dd\u003e\u003c/dl\u003e\u003c/div\u003e","key":"parameters","title":"Parameters"},{"html":"\u003cp\u003eThe ability to temporarily enable or disable a trigger is provided by \u003ca href=\"/docs/18/sql-altertable.html\" title=\"ALTER TABLE\"\u003e\u003ccode class=\"command\"\u003eALTER TABLE\u003c/code\u003e\u003c/a\u003e, not by \u003ccode class=\"command\"\u003eALTER TRIGGER\u003c/code\u003e, because \u003ccode class=\"command\"\u003eALTER TRIGGER\u003c/code\u003e has no convenient way to express the option of enabling or disabling all of a table's triggers at once.\u003c/p\u003e","key":"notes","title":"Notes"},{"html":"\u003cp\u003eTo rename an existing trigger:\u003c/p\u003e\u003cpre class=\"programlisting\"\u003eALTER TRIGGER emp_stamp ON emp RENAME TO emp_track_chgs;\n\u003c/pre\u003e\u003cp\u003eTo mark a trigger as being dependent on an extension:\u003c/p\u003e\u003cpre class=\"programlisting\"\u003eALTER TRIGGER emp_stamp ON emp DEPENDS ON EXTENSION emplib;\n\u003c/pre\u003e","key":"examples","title":"Examples"},{"html":"\u003cp\u003e\u003ccode class=\"command\"\u003eALTER TRIGGER\u003c/code\u003e is a \u003cspan class=\"productname\"\u003ePostgreSQL\u003c/span\u003e extension of the SQL standard.\u003c/p\u003e","key":"compatibility","title":"Compatibility"},{"html":"\u003cspan class=\"simplelist\"\u003e\u003ca href=\"/wiki/sql/alter-table/?v=18\" title=\"ALTER TABLE\"\u003e\u003cspan class=\"refentrytitle\"\u003eALTER TABLE\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e","key":"see_also","title":"See Also"}],"sections_same_as":"","slug":"18","synopsis_html":"ALTER TRIGGER \u003cem class=\"replaceable\"\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/em\u003e ON \u003cem class=\"replaceable\"\u003e\u003ccode\u003etable_name\u003c/code\u003e\u003c/em\u003e RENAME TO \u003cem class=\"replaceable\"\u003e\u003ccode\u003enew_name\u003c/code\u003e\u003c/em\u003e\nALTER TRIGGER \u003cem class=\"replaceable\"\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/em\u003e ON \u003cem class=\"replaceable\"\u003e\u003ccode\u003etable_name\u003c/code\u003e\u003c/em\u003e [ NO ] DEPENDS ON EXTENSION \u003cem class=\"replaceable\"\u003e\u003ccode\u003eextension_name\u003c/code\u003e\u003c/em\u003e","synopsis_text":"ALTER TRIGGER name ON table_name RENAME TO new_name\nALTER TRIGGER name ON table_name [ NO ] DEPENDS ON EXTENSION extension_name","translation_provenance":{"inputs":[{"kind":"current-pgdoc-translation","path":"/Users/vonng/pgsty/pgdoc/zh/18/html/sql-altertrigger.html","sha256":"cb990ce7a0d601b4662e324d5cb58ef63ce57cb3be155a49ed5a11ebf3d4b71a"}],"kind":"same-version-pgdoc","locale":"zh-Hans","source_revision":"b1b500221dbe5437cfca004d6b04d3f6e422765d","version":"18"},"zh_from":"same-version-pgdoc"},"ManualEvidence":{},"MeasuredEvidence":{}},"Text":{"Collection":"sql","Key":"alter-trigger","SourceDatabase":"center","Version":"18","Locale":"en","Title":"ALTER TRIGGER","Summary":"change the definition of a trigger","BodyHTML":"\u003cpre\u003eALTER TRIGGER name ON table_name RENAME TO new_name\nALTER TRIGGER name ON table_name [ NO ] DEPENDS ON EXTENSION extension_name\u003c/pre\u003e\u003csection\u003e\u003ch2\u003eDescription\u003c/h2\u003e\u003cp\u003e\u003ccode\u003eALTER TRIGGER\u003c/code\u003e changes properties of an existing trigger.\u003c/p\u003e\u003cp\u003eThe \u003ccode\u003eRENAME\u003c/code\u003e clause changes the name of the given trigger without otherwise changing the trigger definition. If the table that the trigger is on is a partitioned table, then corresponding clone triggers in the partitions are renamed too.\u003c/p\u003e\u003cp\u003eThe \u003ccode\u003eDEPENDS ON EXTENSION\u003c/code\u003e clause marks the trigger as dependent on an extension, such that if the extension is dropped, the trigger will automatically be dropped as well.\u003c/p\u003e\u003cp\u003eYou must own the table on which the trigger acts to be allowed to change its properties.\u003c/p\u003e\u003c/section\u003e\u003csection\u003e\u003ch2\u003eParameters\u003c/h2\u003e\u003cdiv\u003e\u003cdl\u003e\u003cdt\u003e\u003cspan\u003e\u003cem\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eThe name of an existing trigger to alter.\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan\u003e\u003cem\u003e\u003ccode\u003etable_name\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eThe name of the table on which this trigger acts.\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan\u003e\u003cem\u003e\u003ccode\u003enew_name\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eThe new name for the trigger.\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan\u003e\u003cem\u003e\u003ccode\u003eextension_name\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eThe name of the extension that the trigger is to depend on (or no longer dependent on, if \u003ccode\u003eNO\u003c/code\u003e is specified). A trigger that\u0026#39;s marked as dependent on an extension is automatically dropped when the extension is dropped.\u003c/p\u003e\u003c/dd\u003e\u003c/dl\u003e\u003c/div\u003e\u003c/section\u003e\u003csection\u003e\u003ch2\u003eNotes\u003c/h2\u003e\u003cp\u003eThe ability to temporarily enable or disable a trigger is provided by \u003ca href=\"/docs/18/sql-altertable.html\" title=\"ALTER TABLE\" rel=\"nofollow\"\u003e\u003ccode\u003eALTER TABLE\u003c/code\u003e\u003c/a\u003e, not by \u003ccode\u003eALTER TRIGGER\u003c/code\u003e, because \u003ccode\u003eALTER TRIGGER\u003c/code\u003e has no convenient way to express the option of enabling or disabling all of a table\u0026#39;s triggers at once.\u003c/p\u003e\u003c/section\u003e\u003csection\u003e\u003ch2\u003eExamples\u003c/h2\u003e\u003cp\u003eTo rename an existing trigger:\u003c/p\u003e\u003cpre\u003eALTER TRIGGER emp_stamp ON emp RENAME TO emp_track_chgs;\n\u003c/pre\u003e\u003cp\u003eTo mark a trigger as being dependent on an extension:\u003c/p\u003e\u003cpre\u003eALTER TRIGGER emp_stamp ON emp DEPENDS ON EXTENSION emplib;\n\u003c/pre\u003e\u003c/section\u003e\u003csection\u003e\u003ch2\u003eCompatibility\u003c/h2\u003e\u003cp\u003e\u003ccode\u003eALTER TRIGGER\u003c/code\u003e is a \u003cspan\u003ePostgreSQL\u003c/span\u003e extension of the SQL standard.\u003c/p\u003e\u003c/section\u003e\u003csection\u003e\u003ch2\u003eSee Also\u003c/h2\u003e\u003cspan\u003e\u003ca href=\"/wiki/sql/alter-table/?v=18\" title=\"ALTER TABLE\" rel=\"nofollow\"\u003e\u003cspan\u003eALTER TABLE\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e\u003c/section\u003e","SourceRevision":"wiki-repair-20261023:f88544372b12dcc3fa6f653c441c93c803d1b4a2221227f803f207f54aaa83bb","ContentHash":"d84ef8d5011fc4fb9d3fbedeec72fd08c5eb2dfdec33d649133af4a8d4c494d2","Payload":{"related":["alter-table"],"sections":[{"html":"\u003cp\u003e\u003ccode class=\"command\"\u003eALTER TRIGGER\u003c/code\u003e changes properties of an existing trigger.\u003c/p\u003e\u003cp\u003eThe \u003ccode class=\"literal\"\u003eRENAME\u003c/code\u003e clause changes the name of the given trigger without otherwise changing the trigger definition. If the table that the trigger is on is a partitioned table, then corresponding clone triggers in the partitions are renamed too.\u003c/p\u003e\u003cp\u003eThe \u003ccode class=\"literal\"\u003eDEPENDS ON EXTENSION\u003c/code\u003e clause marks the trigger as dependent on an extension, such that if the extension is dropped, the trigger will automatically be dropped as well.\u003c/p\u003e\u003cp\u003eYou must own the table on which the trigger acts to be allowed to change its properties.\u003c/p\u003e","key":"description","title":"Description"},{"html":"\u003cdiv class=\"variablelist\"\u003e\u003cdl class=\"variablelist\"\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eThe name of an existing trigger to alter.\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003etable_name\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eThe name of the table on which this trigger acts.\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003enew_name\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eThe new name for the trigger.\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003eextension_name\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eThe name of the extension that the trigger is to depend on (or no longer dependent on, if \u003ccode class=\"literal\"\u003eNO\u003c/code\u003e is specified). A trigger that's marked as dependent on an extension is automatically dropped when the extension is dropped.\u003c/p\u003e\u003c/dd\u003e\u003c/dl\u003e\u003c/div\u003e","key":"parameters","title":"Parameters"},{"html":"\u003cp\u003eThe ability to temporarily enable or disable a trigger is provided by \u003ca href=\"/docs/18/sql-altertable.html\" title=\"ALTER TABLE\"\u003e\u003ccode class=\"command\"\u003eALTER TABLE\u003c/code\u003e\u003c/a\u003e, not by \u003ccode class=\"command\"\u003eALTER TRIGGER\u003c/code\u003e, because \u003ccode class=\"command\"\u003eALTER TRIGGER\u003c/code\u003e has no convenient way to express the option of enabling or disabling all of a table's triggers at once.\u003c/p\u003e","key":"notes","title":"Notes"},{"html":"\u003cp\u003eTo rename an existing trigger:\u003c/p\u003e\u003cpre class=\"programlisting\"\u003eALTER TRIGGER emp_stamp ON emp RENAME TO emp_track_chgs;\n\u003c/pre\u003e\u003cp\u003eTo mark a trigger as being dependent on an extension:\u003c/p\u003e\u003cpre class=\"programlisting\"\u003eALTER TRIGGER emp_stamp ON emp DEPENDS ON EXTENSION emplib;\n\u003c/pre\u003e","key":"examples","title":"Examples"},{"html":"\u003cp\u003e\u003ccode class=\"command\"\u003eALTER TRIGGER\u003c/code\u003e is a \u003cspan class=\"productname\"\u003ePostgreSQL\u003c/span\u003e extension of the SQL standard.\u003c/p\u003e","key":"compatibility","title":"Compatibility"},{"html":"\u003cspan class=\"simplelist\"\u003e\u003ca href=\"/wiki/sql/alter-table/?v=18\" title=\"ALTER TABLE\"\u003e\u003cspan class=\"refentrytitle\"\u003eALTER TABLE\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e","key":"see_also","title":"See Also"}],"sections_same_as":"","synopsis_html":"ALTER TRIGGER \u003cem class=\"replaceable\"\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/em\u003e ON \u003cem class=\"replaceable\"\u003e\u003ccode\u003etable_name\u003c/code\u003e\u003c/em\u003e RENAME TO \u003cem class=\"replaceable\"\u003e\u003ccode\u003enew_name\u003c/code\u003e\u003c/em\u003e\nALTER TRIGGER \u003cem class=\"replaceable\"\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/em\u003e ON \u003cem class=\"replaceable\"\u003e\u003ccode\u003etable_name\u003c/code\u003e\u003c/em\u003e [ NO ] DEPENDS ON EXTENSION \u003cem class=\"replaceable\"\u003e\u003ccode\u003eextension_name\u003c/code\u003e\u003c/em\u003e","synopsis_text":"ALTER TRIGGER name ON table_name RENAME TO new_name\nALTER TRIGGER name ON table_name [ NO ] DEPENDS ON EXTENSION extension_name"}},"RequestedLocale":"en","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20","7.3","7.4","8.0","8.1","8.2","8.3","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6"],"Locales":["en","zh-Hans"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
