Feature/pg exceptions