fix exceptions in jdbc postgres adapter