Re: getting permission denied error for user2 while proper privileges are present
Tom Lane <[email protected]> Sat, 18 May 2019 11:07:05 -0400
| Newsgroups | gmane.comp.db.postgresql.sql |
|---|---|
| Message-ID | <[email protected]> |
rajan <[email protected]> writes: > Please notice the lines where GRANT and ALTER DEFAULT PRIVILEGES are > executed. Even though I am executing those statements as postgres user, when > viewing the privileges the grantor is always the learner user. How is that > possible? The GRANT page says If a superuser chooses to issue a GRANT or REVOKE command, the command is performed as though it were issued by the owner of the affected object. In particular, privileges granted via such a command will appear to have been granted by the object owner. (For role membership, the membership appears to have been granted by the containing role itself.) Essentially, the superuser is making use of her privilege to become the object's owning role. regards, tom lane