I have a trigger that looks like:
create trigger syncdataprodTrigger
after insert or update or delete on schema.table
for each row
execute procedure schema.schemaProdTableDataSync();
and a function that contains this snippet:
elseif (TG_OP = 'DELETE') then
delete from schema.table where id1 = old.id1;
RETURN NEW;
What I am expecting is that when a row is deleted from the first table it deletes it from the second table, but I am not getting this. What am I doing wrong and what can I be doing differently?
使它起作用,结果是发生了derps,并且需要将触发器更改为正确的表格...
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.