From: Tom Lane <tgl@sss.pgh.pa.us>
To: Moradhassel, Kavian <kmoradha@ciena.com>
Cc: pgsql-admin@lists.postgresql.org <pgsql-admin@lists.postgresql.org>
Subject: Re: GRANT CREATE or ALTER SCHEMA?
Date: Thu, 22 Mar 2018 11:00:58 -0400
Message-ID: <1151.1521730858@sss.pgh.pa.us> (raw)
In-Reply-To: <MWHPR04MB0625844670D799DC980F638FC2A90@MWHPR04MB0625.namprd04.prod.outlook.com>
References: <MWHPR04MB0625844670D799DC980F638FC2A90@MWHPR04MB0625.namprd04.prod.outlook.com>
"Moradhassel, Kavian" <kmoradha@ciena.com> writes:
> We understand why the public schema is owned by the "postgres" account
> to start with, i.e. because CREATE DATABASE copies from the template1
> database.
Right.
> Changing the owner of the public schema to the database owner after
> database creation (i.e. #1 above) seems to be the simplest approach, but
> we're wondering if there's a reason for the public schema to be owned by
> the postgres account, i.e. beyond just "this is how it happens by
> default". We can't come up with one, and neither can our Google-fu. :-)
No, there isn't another reason, really. There have actually been
proposals to change the behavior of CREATE DATABASE to adjust the
ownership of that schema automatically. But it's not simple to do
from within the creating session, and there'd be backwards-compatibility
complaints anyway.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, kmoradha@ciena.com, pgsql-admin@lists.postgresql.org
Subject: Re: GRANT CREATE or ALTER SCHEMA?
In-Reply-To: <1151.1521730858@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox