How to get the Notice from pgsql function text
Posted: Wed 19 Dec 2007 01:19
Please guide me if I am on the right track
I want to display the notice from a pgsql function
e.g
Now to get the notice displayed should I do this
please ignore any errors, if any in postgresql function
I want to display the notice from a pgsql function
e.g
Code: Select all
CREATE FUNCTION my_function () RETURNS integer
AS 'DECLARE
mxid integer := 20;
BEGIN
for i in 1..mxid loop
RAISE NOTICE '' I am working on following % '' ,i;
end loop
RETURN
mxid;
END;
'
Code: Select all
try
'execute the function as stored procedure
catch ex as CoreLab.PostgreSql.PgSqlException
label1.text = ex.message
end try
please ignore any errors, if any in postgresql function