I'm a newbie with PostgreSQL/libpq. So please help me clarify my confusion:
Assuming I start by executing a 'START TRANSACTION' and do proper error checking (PQresultStatus(res) != [proper_success_value]), am I required to execute a 'ROLLBACK' if something goes wrong after I make an insertion? For example:
- START TRANSACTION : OK
- INSERT .. : OK
- UPDATE .. : FAIL
In this case am I required to execute a 'ROLLBACK' after 'UPDATE' fails? Also what do I do if 'ROLLBACK' also fails?