I know of two ways to obtain a result status (see http://www.postgresql.org/docs/8.0/i...TS-DIAGNOSTICS)
Now I have a stored procedure that creates views and I want to know whether creation of a particular view succeeded. Both of the above methods are useless for this goal. The only solution I can come up with is something like
Code:
PERFORM * FROM information_schema.views
WHERE table_schema = 'public' AND table_name = 'my_view_name';
IF FOUND THEN
RAISE NOTICE 'creation of my_view_name succeeded';
END IF;
I was wondering if there are other/better methods.