Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ez1iS-0005cw-F5 for pgsql-admin@arkaria.postgresql.org; Thu, 22 Mar 2018 15:01:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ez1iR-0003EM-FQ for pgsql-admin@arkaria.postgresql.org; Thu, 22 Mar 2018 15:01:19 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ez1iR-0003Dr-4e for pgsql-admin@lists.postgresql.org; Thu, 22 Mar 2018 15:01:19 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ez1iF-0006lL-W8 for pgsql-admin@lists.postgresql.org; Thu, 22 Mar 2018 15:01:17 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w2MF0wXE001152; Thu, 22 Mar 2018 11:00:58 -0400 From: Tom Lane To: "Moradhassel, Kavian" cc: "pgsql-admin@lists.postgresql.org" Subject: Re: GRANT CREATE or ALTER SCHEMA? In-reply-to: References: Comments: In-reply-to "Moradhassel, Kavian" message dated "Thu, 22 Mar 2018 14:43:12 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1150.1521730858.1@sss.pgh.pa.us> Date: Thu, 22 Mar 2018 11:00:58 -0400 Message-ID: <1151.1521730858@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk "Moradhassel, Kavian" 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