Implementing detailed PostgreSQL support, including better transaction
and exception handling, as well as protection against explict commits.