Revert "Issue #2548725 by dawehner: Fix database exception handling, causing test fails in PostgreSQL" This reverts commit 4b7ba213.