Search Postgresql Archives

Exception handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Can someone explain me about the exception handling in postgresql. Iam
not understanding the scope of a exception block. The exact confusion
that iam facing is as follows:
I have a procedure as follows
BEGIN
EXECUTE an update statement

EXECUTE an insert statement
EXCEPTION WHEN integrity_conatraint_violation THEN
RAISE NOTICE
END;

This procedure is called within another procedure. Now when an
exception is caught the updates are also getting rolled back. I need
the exception block to work only for the insert statement. But if i
dont write the exception block the whole program stops.
Any suggestions?

Thanks
Sam


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux