PostgreSQL: Catch more explicit exception