Re: pgsql: Revoke PUBLIC CREATE from public schema, now owned by pg_databas

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Noah Misch <noah(at)leadboat(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pgsql: Revoke PUBLIC CREATE from public schema, now owned by pg_databas
Date: 2022-11-30 22:58:36
Message-ID: CAKFQuwZO-cbzeZ0m4w+pToB0LuvL-YrkGv7g-i-+xamxY-UprA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On Wed, Nov 30, 2022 at 3:35 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

>
> BTW, is "create a schema with the same name" sufficient detail?
> You have to either make it owned by that user, or explicitly
> grant CREATE permission on it. I'm not sure if that detail
> belongs here, but it feels like maybe it does.
>
>
I'd mention the ownership variant and suggest using the AUTHORIZATION
clause, with an explicit example.

CREATE SCHEMA role_name AUTHORIZATION role_name;

David J.

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2022-12-01 04:32:40 Re: pgsql: Revoke PUBLIC CREATE from public schema, now owned by pg_databas
Previous Message Isaac Morland 2022-11-30 22:57:20 Re: pgsql: Revoke PUBLIC CREATE from public schema, now owned by pg_databas

Browse pgsql-hackers by date

  From Date Subject
Next Message David Rowley 2022-11-30 23:11:56 Re: Non-decimal integer literals
Previous Message Isaac Morland 2022-11-30 22:57:20 Re: pgsql: Revoke PUBLIC CREATE from public schema, now owned by pg_databas