Re: Create DB privilege is not inherited

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Ben Hancock <lists(at)benghancock(dot)com>
Cc: List-Postgres-General <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Create DB privilege is not inherited
Date: 2023-07-27 13:09:28
Message-ID: CAKFQuwbJOYq6hOE-MF9K_2-0XZWK1XA2UpNHt2_SWQS=kVk5zQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thursday, July 27, 2023, Ben Hancock <lists(at)benghancock(dot)com> wrote:
>
>
> Should the CREATEDB privilege be inherited when granting the 'admins'
> role to a user, or is another step required?
>
> Or (quite possibly) have I misunderstood something else?
>

Docs say:

https://www.postgresql.org/docs/current/sql-createrole.html#:~:text=based%20authentication%20method.-,The%20INHERIT%20attribute%20governs,before%20creating%20a%20database.,-The%20INHERIT%20attribute
"

The INHERIT attribute governs inheritance of grantable privileges (that is,
access privileges for database objects and role memberships). It does not
apply to the special role attributes set by CREATE ROLE and ALTER ROLE. For
example, being a member of a role with CREATEDB privilege does not
immediately grant the ability to create databases, even if INHERIT is set;
it would be necessary to become that role via SET ROLE before creating a
database."

David J.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ben Hancock 2023-07-27 14:37:17 Re: Create DB privilege is not inherited
Previous Message Ben Hancock 2023-07-27 12:47:37 Create DB privilege is not inherited