0

Is there any information_schema view that can tell when an object privilege was granted?

The pg_namespace view doesn't have that.

select  
  *
from pg_namespace
join lateral (
  SELECT
    *
  from
    aclexplode(nspacl) as x
) a on true
join pg_user e on a.grantee = e.usesysid
join pg_user r on a.grantor = r.usesysid 
 where e.usename = '<<MY_USERNAME>>';
2
  • No, Postgres does not store this information.
    – user1822
    Mar 17, 2021 at 20:59
  • Thanks @a_horse_with_no_name. If you could post this as an answer, I'll accept and close this.
    – Mas
    Mar 19, 2021 at 20:47

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.