How to grant the USAGE privilege on all types? How can I grant the USAGE privilege on ALL TYPES in a schema? For tables and functions we can use ALL TABLES IN SCHEMA schema_name, but this isn't supported for types:

GRANT { USAGE | ALL [ PRIVILEGES ] }
    ON TYPE type_name [, ...]
    TO role_specification [, ...] [ WITH GRANT OPTION ]


I know I can set a default privilege, but in this case I'd already installed an extension with many types before doing that.
We can do this with dynamic sql and psql, Sub out user1 and user2 with the name of the user. Feel free to delete either. You may also want only DOMAIN or USER-DEFINED TYPE adapting this should be pretty simple.

SELECT format(
  $$GRANT USAGE ON TYPE %s TO %s;$$,
  format('%I.%I.%I', object_catalog, object_schema, object_name ),
  grantUser
)
FROM information_schema.element_types
CROSS JOIN (VALUES ('user1'),('user2')) AS t(grantUser)
WHERE object_type IN ('USER-DEFINED TYPE', 'DOMAIN');


Then run 

\gexec


You can also run this in a do block with PERFORM