Search Postgresql Archives

Re: Do Postgres exceptions rise up the stack?

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

 



On Saturday 30 June 2007 23:14, Postgres User wrote:

> A basic question about raising exceptions in Postgres:
> 
> If  Function A  calls Function B
> 
> and Func B raises an exception, will the exception roll back the
> transaction in Func A by default?   Or do I need to trap and re-raise
> the exception in Func A?
> 
> Thanks.

Any exception aborts the transaction. That's how exceptions work. If you don't
catch them, they bubble all the way to the surface. Otherwise it would be too
much like if-statement error checking.



[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