Hi,
Do as Frank said! It will solve your problem.
Forget your task for a minute and check your command:
update table2
SET
manualdueat = null,
FROM table1,
where table1.idtask = table2.idtask;
Works as a charm, and updates all record in table2 which have an matching counterpart in table1. :)
In per row trigger procedures you have access to the old and new version of currently processed record trough the NEW and OLD record variables. In your trigger procedure you have to update only the record in table2 where table2.idtask=new.idtask.
And just for fun in BEFORE triggers you can also modify the NEW record and with returning NEW modify the whole result of the DML command which activated the trigger, or even refuse it completely with returning NULL;
Regards,
Sándor Daku