Add 'select' to postgres error handling