Re: SQL command : ALTER DATABASE OWNER TO - Mailing list pgsql-docs

From Tom Lane
Subject Re: SQL command : ALTER DATABASE OWNER TO
Date
Msg-id 167867.1706116393@sss.pgh.pa.us
Whole thread Raw
In response to Re: SQL command : ALTER DATABASE OWNER TO  ("David G. Johnston" <david.g.johnston@gmail.com>)
Responses Re: SQL command : ALTER DATABASE OWNER TO
List pgsql-docs
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> postgres=# grant all on database newdb2 to testowner;
> -- as I am logged in as davidj this grant should actually happen, with
> davidj as the grantor
> -- the grants that materialize from ownership has the owning role as the
> grantor

Yes.  The FM points out somewhere that if a superuser does a GRANT,
it's executed as though by the object owner.  That provision predates
when we supported explicit GRANTED BY clauses in GRANT.  I'm not sure
we'd have made it work like that if we had GRANTED BY already, but
I'm afraid of the compatibility implications if we change it now.

            regards, tom lane



pgsql-docs by date:

Previous
From: gparc@free.fr
Date:
Subject: Re: SQL command : ALTER DATABASE OWNER TO
Next
From: "David G. Johnston"
Date:
Subject: Re: SQL command : ALTER DATABASE OWNER TO