Re: set role issue - Mailing list pgsql-hackers

From Tom Lane
Subject Re: set role issue
Date
Msg-id 856556.1754317819@sss.pgh.pa.us
Whole thread Raw
In response to set role issue  (Fabrice Chapuis <fabrice636861@gmail.com>)
Responses Re: set role issue
List pgsql-hackers
Fabrice Chapuis <fabrice636861@gmail.com> 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



pgsql-hackers by date:

Previous
From: jian he
Date:
Subject: Re: CAST(... ON DEFAULT) - WIP build on top of Error-Safe User Functions
Next
From: Thomas Munro
Date:
Subject: Re: [PATCH] OAuth: fix performance bug with stuck multiplexer events