Re: GRANT CREATE or ALTER SCHEMA? - Mailing list pgsql-admin

From Tom Lane
Subject Re: GRANT CREATE or ALTER SCHEMA?
Date
Msg-id 1151.1521730858@sss.pgh.pa.us
Whole thread Raw
In response to GRANT CREATE or ALTER SCHEMA?  ("Moradhassel, Kavian" <kmoradha@ciena.com>)
List pgsql-admin
"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


pgsql-admin by date:

Previous
From: "Moradhassel, Kavian"
Date:
Subject: GRANT CREATE or ALTER SCHEMA?
Next
From: "Moradhassel, Kavian"
Date:
Subject: RE: GRANT CREATE or ALTER SCHEMA?