txn_killall — kill all pending transactions


txn_killall ( in code integer );


This function will terminate all pending transactions. This can be used for resetting infinite loops in stored procedures etc.

The code determines the error reported to the client. Number 6 is preferable, corresponding to the 'transaction rolled back due to previous SQL error'. See txn_error for all supported codes.

Once any SQL statement or procedure notices that its transaction is dead, e.g. deadlocked, it signals the error and takes appropriate action, which is typically to signal the error to the caller and ultimately to the client.


txn_killall (1);

-- kills all transactions with the S1T00 'timed out' error.