And consider this case:

        SAVEPOINT x;
        SELECT func_call();
        SELECT func_call();

Now if func_call has a savepoint, it is really nested because it can't
know whether the savepoint X will be used to roll back, so its status is
dependent on the status of X. Now, if we used savepoints in func_call,
what happens in the second function call when we define a savepoint with
the same name? I assume we overwrite the original, but using nested
transaction syntax seems much clearer.

It also seems in this example that func_call() probably shouldn't have permission to rollback to savepoint x? Otherwise it would get...weird.


---------------------------(end of broadcast)--------------------------- TIP 8: explain analyze is your friend

Reply via email to