Re: pgsql: Revoke PUBLIC CREATE from public schema, now owned by pg_databas - Mailing list pgsql-hackers

From David G. Johnston
Subject Re: pgsql: Revoke PUBLIC CREATE from public schema, now owned by pg_databas
Date
Msg-id CAKFQuwZO-cbzeZ0m4w+pToB0LuvL-YrkGv7g-i-+xamxY-UprA@mail.gmail.com
Whole thread Raw
In response to Re: pgsql: Revoke PUBLIC CREATE from public schema, now owned by pg_databas  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Wed, Nov 30, 2022 at 3:35 PM Tom Lane <tgl@sss.pgh.pa.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.

pgsql-hackers by date:

Previous
From: Isaac Morland
Date:
Subject: Re: pgsql: Revoke PUBLIC CREATE from public schema, now owned by pg_databas
Next
From: David Rowley
Date:
Subject: Re: Non-decimal integer literals