请帮助我理解trigger creation syntax
create trigger cool_trigger
after insert or update
on custom_object_reference
deferrable initially deferred
for each statement
execute procedure do_something();
syntax error at or near "deferrable"
我正在使用PostgreSQL 9.6.7
答案 0 :(得分:3)
只能延迟约束触发器,因此您必须使用
CREATE CONSTRAINT TRIGGER ...
正如文档所述,您只能对AFTER ROW
触发器执行此操作。