From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
Cc: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, gparc(at)free(dot)fr, Daniel Gustafsson <daniel(at)yesql(dot)se>, pgsql-docs <pgsql-docs(at)lists(dot)postgresql(dot)org> |
Subject: | Re: SQL command : ALTER DATABASE OWNER TO |
Date: | 2024-01-24 17:13:13 |
Message-ID: | 167867.1706116393@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-docs |
"David G. Johnston" <david(dot)g(dot)johnston(at)gmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | David G. Johnston | 2024-01-24 19:04:48 | Re: SQL command : ALTER DATABASE OWNER TO |
Previous Message | gparc | 2024-01-24 17:11:30 | Re: SQL command : ALTER DATABASE OWNER TO |