ansible/ansible — pull request #8178 by ToBeReplaced (2014-07-17 05:24:35+00:00)
Title: Make ALL_IN_SCHEMA for tables affect views

##### Issue Type:

Bugfix Pull Request

##### Ansible Version:

ansible 1.6.6

##### Environment:

N/A

##### Summary:

ALL_IN_SCHEMA on tables does not include views. It should, as per http://www.postgresql.org/docs/9.3/static/sql-grant.html :
```
There is also an option to grant privileges on all objects of the same type within one or more
schemas. This functionality is currently supported only for tables, sequences, and functions (but
note that ALL TABLES is considered to include views and foreign tables).
```

##### Steps To Reproduce:

On a database with a role that has had all privileges revoked:
```
- name: Give SELECT privilege to site on all tables and views
postgresql_privs:
db=some_database
privs=SELECT
objs=ALL_IN_SCHEMA
role=some_role
```

##### Expected Results:

`some_role` should be able to select on a view in the public schema of `some_database`.

##### Actual Results:

`some_role` cannot select on a view in the public schema of `some_database`.

##### Pull Request Details:

ALL TABLES is considered to include views, so we must check for reltypes
'r' and 'v', not just 'r'.