我正在尝试编写触发器但是语法错误:
CREATE TRIGGER archive_domain_trig
AFTER UPDATE OF is_rejected ON pending_domains
FOR EACH ROW
WHEN (new.is_rejected is True)
EXECUTE PROCEDURE archive_domain_fun();
错误:“OF”或其附近的语法错误
不仅如此,它还会在“何时”条件下给出错误,例如
CREATE TRIGGER archive_domain_trig
AFTER UPDATE ON pending_domains
FOR EACH ROW
WHEN (new.is_rejected is True)
EXECUTE PROCEDURE archive_domain_fun();
给出:
错误:语法错误在“WHEN”或附近。
select version();
"EnterpriseDB 8.3.0.116 on x86_64-unknown-linux-gnu, compiled by GCC gcc (GCC) 4.1.0"
这几乎与postgres的例子相似,谁能告诉我这里做错了什么?