use exception to handle database error for PostgreSQL test