The function in the following block code may fail.
How to make it to carry on by ignoring exception?
Something like Python's try catch.
for i in (select distinct id from id_table)
loop
raise notice '%', i;
insert into my_table(id, last, arr, count) SELECT i, * from
my_function(i) f(last int, arr int[], count int);
commit;
end loop;