Relax exception handling in create_permissions_for_tests because postgresql generates a slightly different database error.