{"Entry":{"collection":"sql","key":"alter-event-trigger","name":"ALTER EVENT TRIGGER","aliases":["altereventtrigger"],"metadata":{"aliases":["altereventtrigger"],"changed_in":["9.5","14"],"changes":[{"from":"9.2","purpose_changed":false,"renamed":null,"sections":{"added":[],"changed":[],"removed":[]},"status":"added","synopsis":null,"to":"9.3"},{"from":"9.4","purpose_changed":false,"renamed":null,"sections":{"added":[],"changed":[],"removed":[]},"status":"changed","synopsis":{"added":["ALTER EVENT TRIGGER name OWNER TO { new_owner | CURRENT_USER | SESSION_USER }"],"removed":[]},"to":"9.5"},{"from":"11","purpose_changed":false,"renamed":null,"sections":{"added":[],"changed":["parameters"],"removed":[]},"status":"changed","synopsis":null,"to":"12"},{"from":"13","purpose_changed":false,"renamed":null,"sections":{"added":[],"changed":[],"removed":[]},"status":"changed","synopsis":{"added":["ALTER EVENT TRIGGER name OWNER TO { new_owner | CURRENT_ROLE | CURRENT_USER | SESSION_USER }"],"removed":[]},"to":"14"}],"content_hash":"be9b49ebe316bfa8fa3b58ba0ad1a5c19806a251531f75bad4cb7fbedfa53943","editorial":{},"first_version":"9.3","group":"trigger","imported_at":"2026-09-30T17:43:38.337265+08:00","last_version":"20","name":"ALTER EVENT TRIGGER","object":"EVENT TRIGGER","position":6002,"present_in":["9.3","9.4","9.5","9.6","10","11","12","13","14","15","16","17","18","19","20"],"purpose":"change the definition of an event trigger","purpose_zh":"","related":["create-event-trigger","drop-event-trigger"],"slug":"alter-event-trigger","source_rev":"a709ab85","synopsis":"ALTER EVENT TRIGGER name DISABLE\nALTER EVENT TRIGGER name ENABLE [ REPLICA | ALWAYS ]\nALTER EVENT TRIGGER name OWNER TO { new_owner | CURRENT_ROLE | CURRENT_USER | SESSION_USER }\nALTER EVENT TRIGGER name RENAME TO new_name","verb":"ALTER"}},"Definition":{"Collection":"sql","Key":"alter-event-trigger","SourceDatabase":"center","Version":"18","SourceTable":"sqlcmd","SourceKey":"alter-event-trigger","SourceRevision":"a709ab85","Facts":{"anchor":"SQL-ALTEREVENTTRIGGER","file":"sql-altereventtrigger.html","lang":"en","name":"ALTER EVENT TRIGGER","purpose":"change the definition of an event trigger","purpose_zh":"","related":["create-event-trigger","drop-event-trigger"],"sections":[{"html":"\u003cp\u003e\u003ccode class=\"command\"\u003eALTER EVENT TRIGGER\u003c/code\u003e changes properties of an existing event trigger.\u003c/p\u003e\u003cp\u003eYou must be superuser to alter an event trigger.\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\u003enew_owner\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eThe user name of the new owner of the event trigger.\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 of the event trigger.\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"literal\"\u003eDISABLE\u003c/code\u003e/\u003ccode class=\"literal\"\u003eENABLE [ REPLICA | ALWAYS ]\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eThese forms configure the firing of event triggers. A disabled trigger is still known to the system, but is not executed when its triggering event occurs. See also \u003ca href=\"/docs/18/runtime-config-client.html#GUC-SESSION-REPLICATION-ROLE\"\u003esession_replication_role\u003c/a\u003e.\u003c/p\u003e\u003c/dd\u003e\u003c/dl\u003e\u003c/div\u003e","key":"parameters","title":"Parameters"},{"html":"\u003cp\u003eThere is no \u003ccode class=\"command\"\u003eALTER EVENT TRIGGER\u003c/code\u003e statement in the SQL standard.\u003c/p\u003e","key":"compatibility","title":"Compatibility"},{"html":"\u003cspan class=\"simplelist\"\u003e\u003ca href=\"/wiki/sql/create-event-trigger/?v=18\" title=\"CREATE EVENT TRIGGER\"\u003e\u003cspan class=\"refentrytitle\"\u003eCREATE EVENT TRIGGER\u003c/span\u003e\u003c/a\u003e, \u003ca href=\"/wiki/sql/drop-event-trigger/?v=18\" title=\"DROP EVENT TRIGGER\"\u003e\u003cspan class=\"refentrytitle\"\u003eDROP EVENT TRIGGER\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e","key":"see_also","title":"See Also"}],"sections_same_as":"","slug":"18","synopsis_html":"ALTER EVENT TRIGGER \u003cem class=\"replaceable\"\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/em\u003e DISABLE\nALTER EVENT TRIGGER \u003cem class=\"replaceable\"\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/em\u003e ENABLE [ REPLICA | ALWAYS ]\nALTER EVENT TRIGGER \u003cem class=\"replaceable\"\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/em\u003e OWNER TO { \u003cem class=\"replaceable\"\u003e\u003ccode\u003enew_owner\u003c/code\u003e\u003c/em\u003e | CURRENT_ROLE | CURRENT_USER | SESSION_USER }\nALTER EVENT TRIGGER \u003cem class=\"replaceable\"\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/em\u003e RENAME TO \u003cem class=\"replaceable\"\u003e\u003ccode\u003enew_name\u003c/code\u003e\u003c/em\u003e","synopsis_text":"ALTER EVENT TRIGGER name DISABLE\nALTER EVENT TRIGGER name ENABLE [ REPLICA | ALWAYS ]\nALTER EVENT TRIGGER name OWNER TO { new_owner | CURRENT_ROLE | CURRENT_USER | SESSION_USER }\nALTER EVENT TRIGGER name RENAME TO new_name"},"ManualEvidence":{},"MeasuredEvidence":{}},"Text":{"Collection":"sql","Key":"alter-event-trigger","SourceDatabase":"pgweb","Version":"18","Locale":"zh-Hans","Title":"ALTER EVENT TRIGGER","Summary":"更改事件触发器的定义","BodyHTML":"\u003cpre\u003eALTER EVENT TRIGGER name DISABLE\nALTER EVENT TRIGGER name ENABLE [ REPLICA | ALWAYS ]\nALTER EVENT TRIGGER name OWNER TO { new_owner | CURRENT_ROLE | CURRENT_USER | SESSION_USER }\nALTER EVENT TRIGGER name RENAME TO new_name\u003c/pre\u003e\u003csection\u003e\u003ch2\u003e描述\u003c/h2\u003e\u003cp\u003e\u003ccode\u003eALTER EVENT TRIGGER\u003c/code\u003e更改现有事件触发器的属性。\u003c/p\u003e\u003cp\u003e要修改事件触发器，你必须是超级用户。\u003c/p\u003e\u003c/section\u003e\u003csection\u003e\u003ch2\u003e参数\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\u003e要修改的现有事件触发器的名称。\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan\u003e\u003cem\u003e\u003ccode\u003enew_owner\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003e该事件触发器的新所有者的用户名。\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\u003e该事件触发器的新名称。\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan\u003e\u003ccode\u003eDISABLE\u003c/code\u003e/\u003ccode\u003eENABLE [ REPLICA | ALWAYS ]\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003e这些形式配置事件触发器的触发行为。被禁用的触发器仍为系统所知，但在其触发事件发生时不会执行。另见\u003ca href=\"/docs/18/runtime-config-client.html#GUC-SESSION-REPLICATION-ROLE\" rel=\"nofollow\"\u003esession_replication_role\u003c/a\u003e。\u003c/p\u003e\u003c/dd\u003e\u003c/dl\u003e\u003c/div\u003e\u003c/section\u003e\u003csection\u003e\u003ch2\u003e兼容性\u003c/h2\u003e\u003cp\u003eSQL 标准中没有\u003ccode\u003eALTER EVENT TRIGGER\u003c/code\u003e语句。\u003c/p\u003e\u003c/section\u003e\u003csection\u003e\u003ch2\u003e另见\u003c/h2\u003e\u003cspan\u003e\u003ca href=\"/wiki/sql/create-event-trigger/?v=18\" title=\"CREATE EVENT TRIGGER\" rel=\"nofollow\"\u003e\u003cspan\u003eCREATE EVENT TRIGGER\u003c/span\u003e\u003c/a\u003e, \u003ca href=\"/wiki/sql/drop-event-trigger/?v=18\" title=\"DROP EVENT TRIGGER\" rel=\"nofollow\"\u003e\u003cspan\u003eDROP EVENT TRIGGER\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e\u003c/section\u003e","SourceRevision":"1b5ca64c","ContentHash":"c5542ae43b842804cfd53098a51d28215234e5e3b9acc4c89877ceb50d335015","Payload":{"purpose_zh":"更改事件触发器的定义","sections":[{"html":"\u003cp\u003e\u003ccode class=\"command\"\u003eALTER EVENT TRIGGER\u003c/code\u003e更改现有事件触发器的属性。\u003c/p\u003e\u003cp\u003e要修改事件触发器，你必须是超级用户。\u003c/p\u003e","key":"description","title":"描述"},{"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\u003e要修改的现有事件触发器的名称。\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003enew_owner\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003e该事件触发器的新所有者的用户名。\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\u003e该事件触发器的新名称。\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"literal\"\u003eDISABLE\u003c/code\u003e/\u003ccode class=\"literal\"\u003eENABLE [ REPLICA | ALWAYS ]\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003e这些形式配置事件触发器的触发行为。被禁用的触发器仍为系统所知，但在其触发事件发生时不会执行。另见\u003ca href=\"/docs/18/runtime-config-client.html#GUC-SESSION-REPLICATION-ROLE\"\u003esession_replication_role\u003c/a\u003e。\u003c/p\u003e\u003c/dd\u003e\u003c/dl\u003e\u003c/div\u003e","key":"parameters","title":"参数"},{"html":"\u003cp\u003eSQL 标准中没有\u003ccode class=\"command\"\u003eALTER EVENT TRIGGER\u003c/code\u003e语句。\u003c/p\u003e","key":"compatibility","title":"兼容性"},{"html":"\u003cspan class=\"simplelist\"\u003e\u003ca href=\"/wiki/sql/create-event-trigger/?v=18\" title=\"CREATE EVENT TRIGGER\"\u003e\u003cspan class=\"refentrytitle\"\u003eCREATE EVENT TRIGGER\u003c/span\u003e\u003c/a\u003e, \u003ca href=\"/wiki/sql/drop-event-trigger/?v=18\" title=\"DROP EVENT TRIGGER\"\u003e\u003cspan class=\"refentrytitle\"\u003eDROP EVENT TRIGGER\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e","key":"see_also","title":"另见"}],"sections_same_as":"","synopsis_html":"ALTER EVENT TRIGGER \u003cem class=\"replaceable\"\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/em\u003e DISABLE\nALTER EVENT TRIGGER \u003cem class=\"replaceable\"\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/em\u003e ENABLE [ REPLICA | ALWAYS ]\nALTER EVENT TRIGGER \u003cem class=\"replaceable\"\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/em\u003e OWNER TO { \u003cem class=\"replaceable\"\u003e\u003ccode\u003enew_owner\u003c/code\u003e\u003c/em\u003e | CURRENT_ROLE | CURRENT_USER | SESSION_USER }\nALTER EVENT TRIGGER \u003cem class=\"replaceable\"\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/em\u003e RENAME TO \u003cem class=\"replaceable\"\u003e\u003ccode\u003enew_name\u003c/code\u003e\u003c/em\u003e","synopsis_text":"ALTER EVENT TRIGGER name DISABLE\nALTER EVENT TRIGGER name ENABLE [ REPLICA | ALWAYS ]\nALTER EVENT TRIGGER name OWNER TO { new_owner | CURRENT_ROLE | CURRENT_USER | SESSION_USER }\nALTER EVENT TRIGGER name RENAME TO new_name"}},"RequestedLocale":"zh-Hans","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20","9.3","9.4","9.5","9.6"],"Locales":["en","zh-Hans"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
