walrus
walrus copied to clipboard
Confirm `claims_role` has `SELECT` permission to all ref'd types after insert to `realtime.subscriptions`
Use a trigger to make sure the claims_role will be able to select from the table without getting an error like
ERROR: type "some_schema.some_type" does not exist
Ref: https://www.postgresql.org/docs/13/functions-info.html
pg_catalog.has_type_privilege ( [ user name or oid, ] type text or oid, privilege text ) → boolean
Does user have privilege for data type? The only allowable privilege type is USAGE. When specifying a type by name rather than by OID, the allowed input is the same as for the regtype data type (see [Section 8.19](https://www.postgresql.org/docs/13/datatype-oid.html)).