Subject Re: [ib-support] Features and Comparisons to PostgreSQL
Author Martijn Tonies

> > I can agree with you that there shouldn't be a need for nested
> > transactions, but sometimes, one developer might be working on a
> > component, and another developer would be working on an interrelating
> > component. As you can see there might be times when nested transactions
> > might be something that could have some validity.
> Actually, you have nested transactions in FB, sort of :-) Work done by
> stored procedures or triggers is unwinded on error or user exception, so
> if you want to use a "nested transaction" just in procedure or trigger
> (not at app. level), you can throw and exception for rollback and use
> WHEN command to define subtransaction blocks.

Make that - for each BEGIN ... END block all work will be unwinded
if an exception occurs. And make sure to catch the error at the end of
the BEGIN...END block if you don't want your client to throw it...

With regards,

Martijn Tonies
InterBase Workbench - the developer tool for InterBase & Firebird
Firebird Workbench - the developer tool for Firebird
Upscene Productions

"This is an object-oriented system.
If we change anything, the users object."