How do Exception, do nothing and carry on - Mailing list pgsql-sql

From Shaozhong SHI
Subject How do Exception, do nothing and carry on
Date
Msg-id CA+i5Jwa9E1RyApZYViBgG9yyCRT5V4WKRAeWDXuVe_1qf4uCsA@mail.gmail.com
Whole thread Raw
Responses Re: How do Exception, do nothing and carry on  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-sql
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;

pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: How to select the last value/row?
Next
From: "David G. Johnston"
Date:
Subject: Re: How do Exception, do nothing and carry on