Fabrice Chapuis <[email protected]> writes: > I do the following command when connecting locally with user postgres > SET ROLE asuperrole; -- asuperrole has superuser privilege > GRANT SELECT ON pg_statistic TO test_role;
> why the grantee is postgres?
You mean "grantor", no? When a superuser does grant/revoke on some
object, it's recorded as though the object owner issued the command.
And postgres is the owner of the pg_statistic table.
regards, tom lane
