Gregory Stark <stark@enterprisedb.com> writes:
> Ok, I more or less see what's going on. plperl creates a subtransaction
> whenever you execute an SPI query from inside a perl function. That's so that
> errors in the query can throw perl exceptions and be caught in the perl code.
It might also be worthwhile modifying plperl to check $^S which indicates
whether exceptions are going to be caught anywhere. If they're not going to be
caught would it be possible to skip creating the nested transaction and allow
them to force the whole transaction to be rolled back?
I'm not clear though if there would there be any internal perl interpreter
state that would get messed up if we just longjmp out from within perl code
rather than allow perl exceptions to get us out.
-- Gregory Stark EnterpriseDB http://www.enterprisedb.com