agora inbox for pgsql-sql@postgresql.org
help / color / mirror / Atom feedFrom: Tom Lane <tgl@sss.pgh.pa.us>
To: rajan <vgmonnet@gmail.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: getting permission denied error for user2 while proper privileges are present
Date: Sat, 18 May 2019 11:07:05 -0400
Message-ID: <21064.1558192025@sss.pgh.pa.us> (raw)
In-Reply-To: <1558158626560-0.post@n3.nabble.com>
References: <1558152796956-0.post@n3.nabble.com>
<525.1558154817@sss.pgh.pa.us>
<1558158626560-0.post@n3.nabble.com>
rajan <vgmonnet@gmail.com> 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
view thread (5+ messages) latest in thread
Message-ID: <21064.1558192025@sss.pgh.pa.us>
Permalink: ../21064.1558192025@sss.pgh.pa.us/
Also on: postgresql.org/message-id/21064.1558192025@sss.pgh.pa.us
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, vgmonnet@gmail.com
Subject: Re: getting permission denied error for user2 while proper privileges are present
In-Reply-To: <21064.1558192025@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox