##### SUMMARY
postgresql_privs module should support a type parameter option for TYPES to allow Grant/Revoke of usage permissions.

##### ISSUE TYPE
- Feature Idea

##### COMPONENT NAME
postgresql_privs

##### ADDITIONAL INFORMATION
Types is supported in for assigning default privs, but we dont have parity for the ability to modify permissions of existing TYPES objects, GRANT USAGE ON TYPE schema.obj TO role;
'''
RETURN = r'''
queries:
  description: List of executed queries.
  returned: always
  type: list
  sample: ['REVOKE GRANT OPTION FOR INSERT ON TABLE "books" FROM "reader";']
  version_added: '2.8'
'''
import traceback
PSYCOPG2_IMP_ERR = None
try:
    import psycopg2
    import psycopg2.extensions
except ImportError:
    PSYCOPG2_IMP_ERR = traceback.format_exc()
    psycopg2 = None
from ansible.module_utils.basic import AnsibleModule, missing_required_lib
from ansible.module_utils.database import pg_quote_identifier
from ansible.module_utils.postgres import postgres_common_argument_spec
from ansible.module_utils._text import to_native
VALID_PRIVS = frozenset(('SELECT', 'INSERT', 'UPDATE', 'DELETE', 'TRUNCATE',
                         'REFERENCES', 'TRIGGER', 'CREATE', 'CONNECT',
                         'TEMPORARY', 'TEMP', 'EXECUTE', 'USAGE', 'ALL', 'USAGE'))
VALID_DEFAULT_OBJS = {'TABLES': ('ALL', 'SELECT', 'INSERT', 'UPDATE', 'DELETE', 'TRUNCATE', 'REFERENCES', 'TRIGGER'),
                      'SEQUENCES': ('ALL', 'SELECT', 'UPDATE', 'USAGE'),
                      'FUNCTIONS': ('ALL', 'EXECUTE'),
                      'TYPES': ('ALL', 'USAGE')}
executed_queries = []
class Error(Exception):