I have a postgresql function with multiple queries to validate table data.But if error occur in one of queries than whole process of function get stop. But i want that, it should print the error by raise warning the error than escape the error and continue execution of other queries.
--Begin function
BEGIN
----- query 1--------
EXCEPTION
WHEN others THEN
------------------'Exception in query 1';------------
END;
BEGIN
------------------------ Query 2---------------------
EXCEPTION
WHEN others THEN
-------------------'Exception in query 2';-------------------
END;
--End function
this is the code in which i am using exception but i have more than 100 queries in the function so i have have to put each queries in the exception block.And i am asking for some other easy way to solve the problem.