Closed pgguru closed 4 weeks ago
As discussed offline, can you add a test to ensure metadata inspection udfs fail when the read role not granted.
Can't we move ensure_permission check to hook.rs and udfs? That way dest receiver does not hit into permission checks during copy and regular copy to/from is checked properly.
Yup, taking this approach now. Tests pass locally.
In order to allow low-level usage of the
DestReceiver
returned bycreate_copy_parquet_dest_receiver()
, hoist the permissions checks into the actual COPY hook. This allows DestReceiver consumers to perform their own checks/verifications rather than relying on the specifics herein.