This should be easy for anyone familiar with Postgresql:
My application issues a begin_work , performs a series of operations, and then issues commit . Operations and commit are completed inside the try-catch block, whose catch statement performs rollback . Assumption: if an error occurs during the SQL operation, Postgresql will automatically roll back from the transaction, and therefore my rollback will be redundant , but harmless. Is this assumption correct?
(The reason I'm rolling back anyway: just in case, an exception not related to the SQL ocurs operation.)
Jon smark
source share